検索

記事
· 2025年2月6日 3m read

IntegratedML Configuration and Application in InterSystems IRIS

Overview

 

With the help of SQL, you can build, train, and manage machine learning models directly in the database with InterSystems IRIS's robust IntegratedML tool. Using SQL examples that represent your data, we will go over IntegratedML configuration and how it is used in practical situations in this article.

 

IntegratedML Configuration

 

A ML configuration (“ML Configuration”) defines the machine learning provider that will perform the training, in addition to other necessary information. IntegratedML has a default configuration called %AutoML, already activated after installing InterSystems IRIS.

Creating ML Configuration

To create a new ML configuration, we can use the System Management Portal or SQL commands.

Creating ML Configuration via SQL:

CREATE ML CONFIGURATION MeuMLConfig PROVIDER AutoML USING {'verbosity': 1};

To set this configuration as default:

SET ML CONFIGURATION MeuMLConfig;

To view the training settings:

SELECT * FROM INFORMATION_SCHEMA.ML_TRAINING_RUNS;

IntegratedML Application

Creating a predictive model to estimate the amount of energy generated by a consumer unit:

CREATE MODEL PredicaoEnergia PREDICTING (quantidade_generada) FROM UnidadeConsumidora;

Training the model:

TRAIN MODEL PredicaoEnergia;

Making predictions:

SELECT quanto_generada, PREDICT(PredicaoEnergia) AS predicao FROM UnidadeConsumidora WHERE id = 1001;

Implementation: Machine Learning in Solar Energy

1. Data Integration with IRIS

We extracted essential data from multiple tables to build the dataset:

SELECT PSID, CHNNLID, TYPENAME, DEVICESN, DEVICETYPE, FACTORYNAME, STATUS FROM datafabric_solar_bd.EQUIPAMENTS;

2. Predictive Maintenance Model Training

Using Python Embedded in IRIS to train a predictive maintenance model:

from sklearn.ensemble import RandomForestClassifier

from iris import irispy

 

# Load data

sql_query = "SELECT PSID, DEVSTATUS, ALARMCOUNT FROM datafabric_solar_bd.USINAS;" data = irispy.sql(sql_query)

 

# Train the model

model = RandomForestClassifier()

model.fit(data[['DEVSTATUS', 'ALARMCOUNT']], data['PSID'])

3. Forecasting Energy Production

Using time series analysis to forecast daily energy production:

from fbprophet import Prophet

 

# Prepare dataset

df = irispy.sql("SELECT STARTTIMESTAMP, PRODDAYPLANT FROM datafabric_solar_bd.POINTMINUTEDATA;")

df.rename(columns={'STARTTIMESTAMP': 'ds', 'PRODDAYPLANT': 'y'}, inplace=True)

 

# Train forecasting model

model = Prophet()

model.fit(df)

future = model.make_future_dataframe(periods=30)

forecast = model.predict(future)

4. Identifying Areas of High Solar Irradiance

The analysis of geospatial data allows the identification of areas with the greatest potential for solar energy generation, optimizing resource allocation.

Conclusion

IntegratedML makes it easier to implement machine learning in InterSystems IRIS by allowing models to be trained and applied directly using SQL. Furthermore, using machine learning techniques for predictive maintenance and energy generation forecasting can help solar plants operate more efficiently

1 Comment
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
質問
· 2025年2月6日

Sorting, remove duplicate and count of Json file

My usecase is sorting and removing duplicates and getting count from a file that has json messages as a individual rows.

I am currently planning to use pandas for this purpose as its really fast. Below are the steps i am following

1) call a python function (called function) from IRIS classmethod(calling function)

2) the call python function will read the json file in a dataframe

3) perform sorting, dup removal, count in the dataframe

4) convert the dataframe into iris stream

5) return back the stream to iris calling function class method

When i try to write the stream into termial its coming as a %SYS.python object rather a iris stream object.

Below is what my questions are

1) why is the return a %Sys.python rather a iris stream object

2) is there a better way to implement sorting, dup removals n count of record, in a file within iris.

Thanks!

6 Comments
ディスカッション (6)2
続けるにはログインするか新規登録を行ってください
ディスカッション (9)1
続けるにはログインするか新規登録を行ってください
質問
· 2025年2月6日

Error - SFTP connection with ssh key on a server that excludes the rsa-ssh algorithm

 

Hi,

A SFTP server on which we connect has increased its security level by disabling the use of the ssh-rsa algorithm
Since then, SFTP connections with ssh keys are no longer made through Intersytems but through tools such as FileZila and Putty. Looking at the Logs I see that the generated ssh key of type RSA supports other modern algorithms such as rsa-sha2-256 / rsa-sha2-512 ... I wanted to know if the Intersystems SFTP client supports modern algorithms? Or is there an ssh configuration that excludes rsa-sha2 algorithms that will need to be disabled? Here's a section of the error we get in Intersytems ...

ERREUR <Ens>ErrOutConnectFailed: Échec de la connexion SFTP .....'
avec l'erreur ERREUR #7510: Erreur SSH '-18' : SSH Error [80101012]: Username/PublicKey combination invalid [80101012] at F:\2024-1-0-263-0\dev\modules\CacheSSH\Session.cpp:498,0 (alert request ID=364130)

Thanks in advance for your help

1 Comment
ディスカッション (1)2
続けるにはログインするか新規登録を行ってください
記事
· 2025年2月5日 3m read

第十五章 K - L 开头的术语

第十五章 K - L 开头的术语

日志记录 (journaling)

系统

一种功能,系统管理员可以选择启用,导致 IRIS 在日志文件中记录所有或选定全局的更改。如果发生系统故障,可以将这些更改向前滚动。也就是说,在恢复期间,可以将整个事务重新应用到数据库。另请参见写入镜像日志记录 (Write Image Journaling)。

以 K 开头的术语

密钥分发中心 (KDC)

系统

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください