Skip to main content

%DeepSee.PMML.Utils

Class %DeepSee.PMML.Utils [ System = 4 ]

This class bundles a number of utility methods for running PMML models and managing their results.

Methods

CreateFromFile

ClassMethod CreateFromFile(pFile As %String, pClassName As %String, pOverwrite As %Boolean = 1, pCompile As %Boolean = 1, pVerbose As %Boolean = 1) As %Status

Creates a PMML definition class (%DeepSee.PMML.Definition) based on the PMML definition XML in the supplied pFile

CreateFromStream

ClassMethod CreateFromStream(pStream As %Stream.Object, pClassName As %String, pOverwrite As %Boolean = 1, pCompile As %Boolean = 1, pVerbose As %Boolean = 1) As %Status

Creates a PMML definition class (%DeepSee.PMML.Definition) based on the PMML definition XML in the supplied pStream

CreateFromString

ClassMethod CreateFromString(pString As %String, pClassName As %String, pOverwrite As %Boolean = 1, pCompile As %Boolean = 1, pVerbose As %Boolean = 1) As %Status

Creates a PMML definition class (%DeepSee.PMML.Definition) based on the PMML definition XML in the supplied pString

%RunModel

ClassMethod %RunModel(ByRef pResultsId As %Integer, pDefinitionClass As %String, pModelName As %String = "", pDataSource As %String = "", pResultsClass As %String = "%DeepSee.PMML.Utils.TempResult", pTracking As %Boolean = 0) As %Status

Test a DeepSee or SQL-linked PMML model by running the model against all records in the Data Source pDatasource specified in the model definition, defaulting to the first datasource definition found in the model.

Use pResultsClass to define the class (subclass of %DeepSee.PMML.Utils.Result) the results of this batch run will be written to. This defaults to %DeepSee.PMML.Utils.TempResult, which stores its data in the Temp database and therefore gets purged upon restarting the instance.
Results will be stored with their TestId property set to the value of pResultsId if a nonzero, non-null value is provided, or call the GetNewTestId() method of pResultsClass to generate a new one.
If pTracking is true, progress information will be written to ^IRIS.Temp.PMML.BgrTask($job), so this method can be run in the background.

%RunModelFromResultSet

ClassMethod %RunModelFromResultSet(ByRef pResultsId As %Integer, pDefinitionClass As %String, pModelName As %String = "", pResultSet As %ResultSet, ByRef pFieldMap, pResultsClass As %String = "%DeepSee.PMML.Utils.TempResult", pTracking As %Boolean = 0) As %Status

Runs a PMML model against all records returned by a user-supplied ResultSet object, looping through all rows and checking the model outcome against the actual value found in the query result. pFieldMap is expected to contain a mapping from this model's %DeepSee.PMML.Data class to the columns (by name) in the supplied result set. If no field map is specified, the resultset is expected to contain columns with names corresponding to the models data fields.

Use pResultsClass to define the class (subclass of %DeepSee.PMML.Utils.Result) the results of this batch run will be written to. This defaults to %DeepSee.PMML.Utils.TempResult, which stores its data in the Temp database and therefore gets purged upon restarting the instance.
Results will be stored with their TestId property set to the value of pResultsId if a nonzero, non-null value is provided, or call the GetNewTestId() method of pResultsClass to generate a new one.
If pTracking is true, progress information will be written to ^IRIS.Temp.PMML.BgrTask($job), so this method can be run in the background.

%RunModelFromSQL

ClassMethod %RunModelFromSQL(ByRef pResultsId As %Integer, pDefinitionClass As %String, pModelName As %String = "", pSQL As %String, ByRef pFieldMap, ByRef pSQLParams, pResultsClass As %String = "%DeepSee.PMML.Utils.TempResult", pTracking As %Boolean = 0) As %Status

Runs a PMML model against all records returned by a user-supplied SQL query, looping through the rows and checking the model outcome against the actual value found in the query result. pFieldMap is expected to contain a mapping from this model's %DeepSee.PMML.Data class to the columns (by name) in the supplied result set. If no field map is specified, the resultset is expected to contain columns with names corresponding to the models data fields.

Use pResultsClass to define the class (subclass of %DeepSee.PMML.Utils.Result) the results of this batch run will be written to. This defaults to %DeepSee.PMML.Utils.TempResult, which stores its data in the Temp database and therefore gets purged upon restarting the instance.
Results will be stored with their TestId property set to the value of pResultsId if a nonzero, non-null value is provided, or call the GetNewTestId() method of pResultsClass to generate a new one.
If pTracking is true, progress information will be written to ^IRIS.Temp.PMML.BgrTask($job), so this method can be run in the background.

%RunModelFromPMMLRows

ClassMethod %RunModelFromPMMLRows(ByRef pResultsId As %Integer, pDefinitionClass As %String, pModelName As %String = "", pResultsClass As %String = "%DeepSee.PMML.Utils.TempResult", pTracking As %Boolean = 0) As %Status

Runs a PMML model against the records included in the PMML model definition.

Use pResultsClass to define the class (subclass of %DeepSee.PMML.Utils.Result) the results of this batch run will be written to. This defaults to %DeepSee.PMML.Utils.TempResult, which stores its data in the Temp database and therefore gets purged upon restarting the instance.
Results will be stored with their TestId property set to the value of pResultsId if a nonzero, non-null value is provided, or call the GetNewTestId() method of pResultsClass to generate a new one.
If pTracking is true, progress information will be written to ^IRIS.Temp.PMML.BgrTask($job), so this method can be run in the background.

%DropResults

ClassMethod %DropResults(pTestId As %Integer) As %Status

Drops all results for a given test ID from the %DeepSee.PMML.Utils.TempResult table.

%DropAllResults

ClassMethod %DropAllResults() As %Status

Drops all results for all test IDs from the %DeepSee.PMML.Utils.TempResult table.