Home > Class Reference > %SYS namespace > %DeepSee.PMML.Utils.TreeBuilder


class %DeepSee.PMML.Utils.TreeBuilder extends %Library.RegisteredObject

Utility class to build Tree models for a %DeepSee.PMML.Dataset object.

Property Inventory

Method Inventory


property ConsiderNullValues as %Boolean [ InitialExpression = 0 ];
Whether or not to consider null (missing) values for split criteria
Property methods: ConsiderNullValuesDisplayToLogical(), ConsiderNullValuesGet(), ConsiderNullValuesIsValid(), ConsiderNullValuesLogicalToDisplay(), ConsiderNullValuesNormalize(), ConsiderNullValuesSet()
property Dataset as %DeepSee.PMML.Dataset;
The dataset to mine.
Property methods: DatasetGet(), DatasetGetSwizzled(), DatasetIsValid(), DatasetNewObject(), DatasetSet()
property MinimalSplitCoverage as %Numeric [ InitialExpression = 0.05 ];
Minimal % of the total number of records represented by a node that should be covered by a branch. If a branch covers fewer records than this value, it is ignored
Property methods: MinimalSplitCoverageDisplayToLogical(), MinimalSplitCoverageGet(), MinimalSplitCoverageIsValid(), MinimalSplitCoverageLogicalToDisplay(), MinimalSplitCoverageNormalize(), MinimalSplitCoverageSet()
property SplitScoringAlgorithm as %String (VALUELIST = ",Confidence,GiniImpurity,InformationGain") [ InitialExpression = "GiniImpurity" ];
Which metric to use to judge split quality. This metric is returned as the split "score" by FindSplits()
Property methods: SplitScoringAlgorithmDisplayToLogical(), SplitScoringAlgorithmGet(), SplitScoringAlgorithmIsValid(), SplitScoringAlgorithmLogicalToDisplay(), SplitScoringAlgorithmLogicalToOdbc(), SplitScoringAlgorithmNormalize(), SplitScoringAlgorithmSet()
property SplitsPerNode as %Integer [ InitialExpression = 2 ];
Default (maximum) number of branches per node
Property methods: SplitsPerNodeDisplayToLogical(), SplitsPerNodeGet(), SplitsPerNodeIsValid(), SplitsPerNodeLogicalToDisplay(), SplitsPerNodeNormalize(), SplitsPerNodeSet()
property TargetField as %String;
The target field whose value is to be derived through this tree. This field should be part of Dataset.
Property methods: TargetFieldDisplayToLogical(), TargetFieldGet(), TargetFieldIsValid(), TargetFieldLogicalToDisplay(), TargetFieldLogicalToOdbc(), TargetFieldNormalize(), TargetFieldSet()
property TrackDistributions as %Boolean [ InitialExpression = 1 ];
Whether or not to track distribution information for tree nodes
Property methods: TrackDistributionsDisplayToLogical(), TrackDistributionsGet(), TrackDistributionsIsValid(), TrackDistributionsLogicalToDisplay(), TrackDistributionsNormalize(), TrackDistributionsSet()
property Tree as %Integer [ MultiDimensional ];
..Tree = $i ..Tree(NodeId) = $lb(parent, targetValue, confidence, count, isLeaf) ..Tree(NodeId, "condition") = [AND|OR|$lb(field, operator, value)] ..Tree(NodeId, "ch", ChildNode) = "" ..Tree(NodeId, "distribution", value) = count
Property methods: TreeDisplayToLogical(), TreeGet(), TreeIsValid(), TreeLogicalToDisplay(), TreeNormalize(), TreeSet()


method Build(pMaxDepth As %Integer = 3) [ Language = objectscript ]

Builds a tree structure with a maximum depth of pMaxDepth.

If a tree structure was already built, this method silently exits. Use Reset() to erase an existing tree structure.

method FindSplits(pNode As %Integer, Output pSplits) as %Status [ Language = objectscript ]
Returns an unsorted array of candidate splits for node pNode: pSplits(n) = $lb(score, coverage, targetValue, confidence, recordCount, isLeaf) pSplits(n,"condition") = ...
method GetInvertedFilter(ByRef pFilter, Output pInverted) as %Status [ Language = objectscript ]
Returns the inverse of pFilter, equivalent to a boolean NOT of the entire pFilter.
method GetNodeFilters(pNode As %Integer, Output pFilters) as %Status [ Language = objectscript ]
Returns the combination of filter conditions (pFilters) a record should satisfy to end up in node pNode. This is a combination of the node's own condition, its full ancestry and any prior siblings' conditions.
method MergeFilters(ByRef pFilter, ByRef pOtherFilter, pLogic As %String = "AND") as %Status [ Language = objectscript ]
Appends pOtherFilter to pFilter using pLogic logic
method Print(pNode As %Integer = 0, pLevel As %Integer = 0, pPrintDistribution As %Boolean = 0) as %Status [ Language = objectscript ]
Prints the tree (starting with pNode) to the terminal.
method Reset() as %Status [ Language = objectscript ]
After changing building parameters, run this method to erase the current tree structure so Build() can be run again.
method SplitNode(pNode As %Integer) as %Status [ Language = objectscript ]
Splits node pNode in SplitsPerNode sub-nodes (or fewer, if not enough candidate splits satisfy coverage and other selection criteria).

Inherited Members

Inherited Methods

FeedbackOpens in a new window