%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
- ConsiderNullValues
- Dataset
- MinimalSplitCoverage
- SplitScoringAlgorithm
- SplitsPerNode
- TargetField
- TrackDistributions
- Tree
Method Inventory
- Build()
- FindSplits()
- GetInvertedFilter()
- GetNodeFilters()
- MergeFilters()
- Print()
- Reset()
- SplitNode()
Properties
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()
Methods
method Build(pMaxDepth As %Integer = 3)
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.
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
Returns the inverse of pFilter, equivalent to a boolean NOT of the entire pFilter.
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.
Appends pOtherFilter to pFilter using pLogic logic
method Print(pNode As %Integer = 0, pLevel As %Integer = 0, pPrintDistribution As %Boolean = 0) as %Status
Prints the tree (starting with pNode) to the terminal.
method Reset() as %Status
After changing building parameters, run this method to erase the current tree structure so
Build() can be run again.
Splits node pNode in SplitsPerNode sub-nodes (or fewer, if
not enough candidate splits satisfy coverage and other selection criteria).
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()