%ML.TrainedModel

persistent class %ML.TrainedModel extends %Library.Persistent

SQL Table Name: %ML.TrainedModel

Base class for a trained model

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties

property Model as %ML.Model [ Required ];
Base model we trained on
Property methods: ModelGet(), ModelGetObject(), ModelGetObjectId(), ModelGetStored(), ModelGetSwizzled(), ModelInfoBuildValueArray(), ModelInfoCollectionToDisplay(), ModelInfoCollectionToOdbc(), ModelInfoDisplayToCollection(), ModelInfoDisplayToLogical(), ModelInfoGet(), ModelInfoGetObject(), ModelInfoGetObjectId(), ModelInfoGetStored(), ModelInfoGetSwizzled(), ModelInfoIsValid(), ModelInfoLogicalToDisplay(), ModelInfoLogicalToOdbc(), ModelInfoNormalize(), ModelInfoOdbcToCollection(), ModelInfoSet(), ModelInfoSetObject(), ModelInfoSetObjectId(), ModelIsValid(), ModelNameDisplayToLogical(), ModelNameGet(), ModelNameGetStored(), ModelNameIsValid(), ModelNameLogicalToDisplay(), ModelNameLogicalToOdbc(), ModelNameNormalize(), ModelNameSet(), ModelNewObject(), ModelSet(), ModelSetObject(), ModelSetObjectId(), ModelTypeDisplayToLogical(), ModelTypeGet(), ModelTypeGetStored(), ModelTypeIsValid(), ModelTypeLogicalToDisplay(), ModelTypeLogicalToOdbc(), ModelTypeNormalize(), ModelTypeSet(), ModelUnSwizzle()
property ModelInfo as array of %String (MAXLEN = 1024);
Model information
Property methods: ModelInfoBuildValueArray(), ModelInfoCollectionToDisplay(), ModelInfoCollectionToOdbc(), ModelInfoDisplayToCollection(), ModelInfoDisplayToLogical(), ModelInfoGet(), ModelInfoGetObject(), ModelInfoGetObjectId(), ModelInfoGetStored(), ModelInfoGetSwizzled(), ModelInfoIsValid(), ModelInfoLogicalToDisplay(), ModelInfoLogicalToOdbc(), ModelInfoNormalize(), ModelInfoOdbcToCollection(), ModelInfoSet(), ModelInfoSetObject(), ModelInfoSetObjectId()
property ModelName as %String (MAXLEN = 275) [ Required ];
Trained Model name, same as the name for the cooresponding Training Run
Property methods: ModelNameDisplayToLogical(), ModelNameGet(), ModelNameGetStored(), ModelNameIsValid(), ModelNameLogicalToDisplay(), ModelNameLogicalToOdbc(), ModelNameNormalize(), ModelNameSet()
property ModelType as %String (VALUELIST = ",classification,regression");
Model type
Property methods: ModelTypeDisplayToLogical(), ModelTypeGet(), ModelTypeGetStored(), ModelTypeIsValid(), ModelTypeLogicalToDisplay(), ModelTypeLogicalToOdbc(), ModelTypeNormalize(), ModelTypeSet()
property Provider as %String (MAXLEN = 128) [ Required ];
ML Provider that did the training
Property methods: ProviderDisplayToLogical(), ProviderGet(), ProviderGetStored(), ProviderIsValid(), ProviderLogicalToDisplay(), ProviderLogicalToOdbc(), ProviderNormalize(), ProviderSet()
property TrainedAt as %TimeStamp [ InitialExpression = $ZDATETIME($ZTIMESTAMP,3,1,3) , Required ];
Timestamp for when the model was trained (UTC)
Property methods: TrainedAtDisplayToLogical(), TrainedAtGet(), TrainedAtGetStored(), TrainedAtIsValid(), TrainedAtLogicalToDisplay(), TrainedAtNormalize(), TrainedAtOdbcToLogical(), TrainedAtSet()
property TrainingRun as %ML.TrainingRun;
Training run
Property methods: TrainingRunGet(), TrainingRunGetObject(), TrainingRunGetObjectId(), TrainingRunGetStored(), TrainingRunGetSwizzled(), TrainingRunIsValid(), TrainingRunNewObject(), TrainingRunSet(), TrainingRunSetObject(), TrainingRunSetObjectId(), TrainingRunUnSwizzle()

Methods

abstract method %Begin() as %Status [ Language = objectscript ]
Begin model operations
abstract method %End() as %Status [ Language = objectscript ]
End model operations
private method %OnBeforeSave(insert As %Boolean) as %Status [ Language = objectscript ]
This callback method is invoked by the %Save() method to provide notification that the object is being saved. It is called before any data is written to disk.

insert will be set to 1 if this object is being saved for the first time.

If this method returns an error then the call to %Save() will fail.

abstract method %Predict(data As %List, ByRef results As %List) as %Status [ Language = objectscript ]
Predict on an ML model
method %PredictAll(tfn As %Integer, argspos As %List, predpos As %List, probpos As %List = "", expr As %String = "") as %Status [ Language = objectscript ]
Bulk Predict arguments: tfn - tempfile index argspos - Positions of the WithColumns in the temp rows, $list(column-positions) predpos - Position of the predicted value, $list(result-column-positions) probpos - Position of the probability value, $list(result-column-positions) expr - expression for probability returns: $$$OK on success, otherwise a $$$ERROR(...)
abstract method %Probability(expr As %String = 1, data As %List, ByRef results As %List) as %Status [ Language = objectscript ]
Predict probability on an ML model Arguments: expr: The argument of PROBABILITY's FOR clause, defaults to 1 data: $List of WITH clause values results: PBR, return value

Indices

index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (NameIndex on ModelName) [Unique];
Index methods: NameIndexCheck(), NameIndexCheckUnique(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint()

Triggers

trigger %DeleteTrainedModelTrigger (BEFORE event DELETE);
When deleting a TrainedModel Purge any cached queries that used this trained model
trigger DeleteTrigger (BEFORE event DELETE);
When deleting a TrainedModel, also delete any %ML.ValidationRun and %ML.ValidationMetric objects for this Model

Inherited Members

Inherited Methods (Including Private)

Storage

Storage Model: Storage (%ML.TrainedModel)

^IRIS.ML.TrainedModelD(ID,"ModelInfo",n)
=
ModelInfo(n)

Storage Model: Storage (%ML.TrainedModel)

^IRIS.ML.TrainedModelD(ID)
=
%%CLASSNAME
Model
Provider
TrainingRun
TrainedAt
ModelName
ModelType
Feedback