Skip to main content

%ML.AutoML.Provider

Class %ML.AutoML.Provider Extends %ML.Provider

Implements the AutoML provider

Parameters

PROVIDERNAME

Parameter PROVIDERNAME As %String = "AutoML";

Provider name

Properties

initialized

Property initialized As %Boolean [ InitialExpression = 0 ];

automl

Property automl As %SYS.Python [ Internal, Transient ];

automlts

Property automlts As %SYS.Python [ Internal, Transient ];

numpy

Property numpy As %SYS.Python [ Internal, Transient ];

pandas

Property pandas As %SYS.Python [ Internal, Transient ];

datetime

Property datetime As %SYS.Python [ Internal, Transient ];

builtins

Property builtins As %SYS.Python [ Internal, Transient ];

decimal

Property decimal As %SYS.Python [ Internal, Transient ];

cProfile

Property cProfile As %SYS.Python [ Internal, Transient ];

pstats

Property pstats As %SYS.Python [ Internal, Transient ];

io

Property io As %SYS.Python [ Internal, Transient ];

Methods

%GetDefaultSettings

ClassMethod %GetDefaultSettings(ByRef settings As %DynamicObject)

Adds the default settings for AutoML to the settings dynamic object

%BeginTraining

Method %BeginTraining(model As %ML.Model, data As %SQL.StatementResult, trainingrun As %ML.TrainingRun, ByRef name As %String = "", ByRef trainkey) As %Status

Train an ML model name is no longer used. trainingrun.name is already defined

%DoTrain

Method %DoTrain(df As %SYS.Python, args As %DynamicObject, timeseries As %Boolean) As %SYS.Python [ CodeMode = expression, Internal ]

Helper method for invoking a python method with keyword args while under I/O capture 0 :..automl.train(df, args...), :..automlts.train(df, args...)

%WaitForTraining

Method %WaitForTraining(ByRef trainkey, trainingrun As %ML.TrainingRun, ByRef trainedmodel As %ML.TrainedModel, timeoutMS As %Integer = -1) As %Status

Check for training complete

%PredictAll

Method %PredictAll(trainedmodel As %ML.AutoML.TrainedModel, tfn As %Integer, argspos As %List, predpos As %List, probpos As %List, expr As %String = "", mtorder As %List, mtunary As %List) As %Status

Bulk Predict

%OnInit

Method %OnInit() As %Status

Initialize an ML provider

%ImportPackage

ClassMethod %ImportPackage(pkgname As %String, Output pkg) As %Status

%StartProfiler

Method %StartProfiler(options As %String, ByRef profiler As %SYS.Python) As %Status

Start the Python profiler

%StopProfiler

Method %StopProfiler(profiler As %SYS.Python, ByRef sortby As %String = "CUMULATIVE", ByRef results As %String) As %Status

Stop the Python profiler

%ResultSetToDataFrame

Method %ResultSetToDataFrame(data As %SQL.StatementResult, ByRef info As %RegisteredObject, ByRef df As %RegisteredObject, ByRef count As %Integer, predictingColumn As %String) As %Status

Convert an IRIS result set into a dataframe.
If the label column, predictingColumn, is defined,then rows with missing values in the label column will be excluded from the dataframe.

%ResultSetMetaData

ClassMethod %ResultSetMetaData(data As %SQL.StatementResult, ByRef info As %RegisteredObject, ByRef columns As %List, ByRef types As %List) As %Status

Determine the metadata for a result set

maperror

ClassMethod maperror(error As %String, text As %String) As %Status [ CodeMode = expression, Internal ]

Map an automl error to a %Status

%TempFileToDataFrame

Method %TempFileToDataFrame(columns As %List, types As %List, tfn As %Integer, argspos As %List, ByRef df As %SYS.Python, ByRef count As %Integer, mtorder As %List, mtunary As %List) As %Status

Convert an IRIS temp file into Python Pandas DataFrame data

%DataFrameToTempFile

Method %DataFrameToTempFile(tfn As %Integer, df As %SYS.Python, fieldnames As %List, positions As %List, types As %List, isPredict As %List) As %Status

Update temp file #tfn using the data in DataFrame df Inputs: tfn: Temp file number df: a Python DataFrame fieldnames=$lb(field1, ...): A $List of strings that indicates names of fields in df that will be added to temp file #tfn positions=$lb(pos1, ...): A list of integers that indicates the corresponding positions of each df field in temp file #tfn types=$lb(type1, ...): A list of integers that indicates the corresponding ObjectScript type of each df field in temp file #tfn isPredict=$lb(predict1, ...): A list of integers that indicates if each df field is predict or probablity. If predict=1, this is predict, otherwise, probability

%TSDataFrameToTempFile

Method %TSDataFrameToTempFile(tfn As %Integer, df As %SYS.Python, tsheaders As %SYS.Python, datetimecolumn As %String, channelColumns As %List, channelTypes As %List, mtorder As %List, mtunary As %List) As %Status

Update temp file #tfn using the data in DataFrame df acquired from TimeSeries predictions Inputs: tfn: Temp file number df: a Python DataFrame headers: IRIS table column names pcTypes: datetime column name

maptype2python

Method maptype2python(type As %Integer, value) As %String [ CodeMode = expression, Internal ]

Map an IRIS type to a python type

maptype2iris

Method maptype2iris(type As %Integer, value) As %String [ CodeMode = expression, Internal ]

Map a Python type to IRIS

pyval2str

Method pyval2str(pyval) As %String [ CodeMode = expression ]

Convert a python value to an SQL string