Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

%iKnow.Classification.Utils

class %iKnow.Classification.Utils

This class bundles a number of methods for validating Text Classifiers against existing data.

Method Inventory

Methods

classmethod %RunModelFromDomain(ByRef pResultsId As %Integer, pDefinitionClass As %String, pDomainId As %Integer, pMetadataField As %String, pFilter As %iKnow.Filters.Filter = "", pResultsClass As %String = "%DeepSee.PMML.Utils.TempResult", pTracking As %Boolean = 0, pKeepScoreForClass As %String = "1") as %Status

Validates a Text Classifier against all sources in a domain, optionally filtered through a %iKnow.Filters.Filter filter object pFilter, checking the model outcome against the actual value found in the metadata field named pMetadataField.

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 and tracked by a UI.

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

Validates a Text Classifier against all records returned by a custom ResultSet, looping through the rows and checking the model outcome against the actual value found in the query result. The ResultSet should either return columns named _Text and _Category containing the text to categorize and the actual category value, or a mapping from these mandatory fields to the column names should be provided through pFieldMap.

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 a temporary global 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 and tracked by a UI.

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

Validates a Text Classifier 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. The SQL query should either return columns named _Text and _Category containing the text to categorize and the actual category value, or a mapping from these mandatory fields to the column names should be provided through pFieldMap.

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 databsae 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 and tracked by a UI.

FeedbackOpens in a new tab