%DeepSee.PMML.Definition
Class %DeepSee.PMML.Definition Extends %ZEN.Component.page [ Abstract, CompileAfter = %DeepSee.PMML.Definition.PMML, System = 4 ]
This class represents a predictive model described in PMML (Predictive Modelling Markup Language), an XML standard managed by the Data Mining Group (www.dmg.org) for describing Predictive Analytics models.
Subclasses of this class should provide this XML in an XData block named PMML, so it will be validated and interpreted upon compiling the class. Upon compilation, additional helper classes will be automatically generated:
- A single %DeepSee.PMML.Data class representing the data fields required by this model.
- A class for each model described in this PMML fragment (can be more than one), with dedicated code to execute this model.
- %DeepSee.PMML.ModelInput and %DeepSee.PMML.ModelOutput classes for each model, which are instantiated and managed automatically by the model class.
In addition to the generated classes, subclasses of this class are also available as Zen pages so the models they define can be run from a User Interface.
Use this class' %GetModelClassName to retrieve the model class for a named model in the PMML definition and then invoke its %Execute* methods as desired. See also the %DeepSee.PMML.Model.AbstractModel class reference for more information about these execution options, or %DeepSee.PMML.Utils for executing the model against a batch of records at once.
Parameters
DOMAIN
Parameter DOMAIN = "PMML";
DISABLETRACING
Parameter DISABLETRACING [ Internal ] = 0;
Set to 1 to disable the use of tracing model output altogether
XDatas
PMML
XData PMML [ XMLNamespace = "http://www.intersystems.com/deepsee/pmml" ]
The XData block containing the actual PMML specification.
Contents
XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ]
XData block defining the contents of the GUI presenting a manual interfacte for running the models described in PMML
Methods
%GetDefinition
ClassMethod %GetDefinition(Output pPMML As %DeepSee.PMML.Definition.PMML) As %Status [ CodeMode = objectgenerator, Internal ]
%GetModelInstance
ClassMethod %GetModelInstance(ByRef pModelName As %String = "", ByRef pModel As %DeepSee.PMML.Model.AbstractModel) As %Status
This method returns a %DeepSee.PMML.Model.AbstractModel instance for the model in this definition corresponding to pModelName.
%GetModelClassName
ClassMethod %GetModelClassName(ByRef pModelName As %String = "") As %String [ CodeMode = objectgenerator, GenerateAfter = %GetDefinition ]
Returns the class name of the model identified by pModelName in PMML. If left blank, returns the class name of the first model in the model definition, setting pModelName to its logical name at the same time.
%GetDataClassName
ClassMethod %GetDataClassName() As %String
Returns the name of the %DeepSee.PMML.Data class generated upon compiling this PMML definiton.
%CreateDataset
ClassMethod %CreateDataset(pDataSource As %String = "", Output pDataset As %DeepSee.PMML.Dataset) As %Status [ Internal ]
%GetModels
ClassMethod %GetModels(Output pModels, pIncludeSecondary As %Boolean = 0) As %Status [ CodeMode = objectgenerator, GenerateAfter = %GetModelClassName, Internal ]
Returns pModels(n) = $lb(modelName, class, type)
If pIncludeSecondary=1, models nested within composite models will also be returned. Note that these cannot necessarily be invoked separately.
OnGetData
Method OnGetData(ByRef pParameters, Output pObject As %RegisteredObject) As %Status [ Internal ]
OnSubmitData
Method OnSubmitData(pCommand As %String, pProvider As %ZEN.Auxiliary.jsonProvider, pObject As %RegisteredObject, Output pResponse As %RegisteredObject) As %Status [ Internal ]
%OnAfterCreatePage
Method %OnAfterCreatePage() As %Status
Populates the properties and models on this Zen page according to the contents of PMML
%AddProperties
Method %AddProperties() As %Status [ Internal, Private ]
GetInputFieldsForModel
Method GetInputFieldsForModel(pModel As %String, pSeparator As %String) As %String [ Internal, ZenMethod ]
update
ClientMethod update(id, value) [ Language = javascript ]
Update test page contents based on user input
reset
ClientMethod reset() [ Language = javascript ]
disableUnusedFields
ClientMethod disableUnusedFields() [ Language = javascript ]
onloadHandler
ClientMethod onloadHandler() [ Language = javascript ]
onChangeModel
ClientMethod onChangeModel(model) [ Language = javascript ]
Invoked when selecting a model in the GUI
GetTestOutput
Method GetTestOutput(pModelName As %String, Output pModel As %DeepSee.PMML.Model.AbstractModel, Output pOutput As %DeepSee.PMML.ModelOutput, pTrace As %Boolean = 0) As %Status [ Internal, Private ]
DrawTrace
Method DrawTrace(pSeed As %String) As %Status [ Internal ]
DrawOutput
Method DrawOutput(pSeed As %String) As %Status [ Internal ]