|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.decisiontree2.model.DecisionTreeNode
org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplit
org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplitPMML
public class DecisionTreeNodeSplitPMML
Decision tree split node that supports PMML predicates to partition the data. An arbitrary number of childs (>2) is allowed.
Constructor Summary | |
---|---|
DecisionTreeNodeSplitPMML()
|
|
DecisionTreeNodeSplitPMML(int nodeId,
DataCell majorityClass,
LinkedHashMap<DataCell,Double> classCounts,
String splitAttribute,
PMMLPredicate[] splitPredicates,
DecisionTreeNode[] children)
Constructor of base class. |
|
DecisionTreeNodeSplitPMML(int nodeId,
DataCell majorityClass,
LinkedHashMap<DataCell,Double> classCounts,
String splitAttribute,
PMMLPredicate[] splitPredicates,
DecisionTreeNode[] children,
int defaultChild)
Constructor of base class. |
Method Summary | |
---|---|
void |
addCoveredColor(DataCell cell,
DataRow row,
DataTableSpec spec,
double weight)
Add colors for patterns given as a row of values if they fall within a specific node. |
void |
addCoveredPattern(DataCell cell,
DataRow row,
DataTableSpec spec,
double weight)
Add patterns given as a row of values if they fall within a specific node. |
Set<RowKey> |
coveredPattern()
|
LinkedHashMap<DataCell,Double> |
getClassCounts(DataCell cell,
DataRow row,
DataTableSpec spec)
Determine class counts for a new pattern given as a row of values. |
LinkedHashMap<DataCell,Double> |
getClassCounts(DataRow row,
DataTableSpec spec)
Determine class counts for a new pattern given as a row of values. |
DecisionTreeNode |
getDefaultChild()
|
int |
getDefaultChildIndex()
|
PMMLPredicate[] |
getSplitPred()
Returns the split predicate array of this node. |
String |
getStringSummary()
|
void |
loadNodeSplitInternalsFromPredParams(ModelContentRO pConf)
Load internal SplitNode settings from a ModelContent object. |
void |
saveNodeSplitInternalsToPredParams(ModelContentWO pConf)
save internal SplitNode settings to a ModelContent object. |
void |
setDefaultChild(int defaultChild)
|
Methods inherited from class org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplit |
---|
addCoveredColor, addCoveredPattern, addNode, addNodeToTreeDepthFirst, children, getAllowsChildren, getChildAt, getChildCount, getChildNodeAt, getChildren, getCountOfSubtree, getIndex, getMVStrategy, getNodeClassWeights, getNTCStrategy, getSplitAttr, isLeaf, loadNodeInternalsFromPredParams, makeRoomForKids, replaceChild, saveNodeInternalsToPredParams, setChildNodeIndex, setMVStrategy, setNTCStrategy |
Methods inherited from class org.knime.base.node.mine.decisiontree2.model.DecisionTreeNode |
---|
addColorToMap, classifyPattern, coveredColors, createNewNode, createNodeFromPredictorParams, getClassCounts, getCustomData, getEntireClassCount, getMajorityClass, getOverallColorCount, getOwnClassCount, getOwnIndex, getParent, getPrefix, getWinner, loadFromPredictorParams, newColors, resetColorInformation, saveToPredictorParams, setCoveredColors, setCustomData, setParent, setPrefix, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DecisionTreeNodeSplitPMML()
public DecisionTreeNodeSplitPMML(int nodeId, DataCell majorityClass, LinkedHashMap<DataCell,Double> classCounts, String splitAttribute, PMMLPredicate[] splitPredicates, DecisionTreeNode[] children)
nodeId
- the id of this nodemajorityClass
- the majority class of the records in this nodeclassCounts
- the class distribution of the data in this nodesplitAttribute
- the attribute name on which to splitsplitPredicates
- the split predicates used to partition the datachildren
- the children split according to the split valuespublic DecisionTreeNodeSplitPMML(int nodeId, DataCell majorityClass, LinkedHashMap<DataCell,Double> classCounts, String splitAttribute, PMMLPredicate[] splitPredicates, DecisionTreeNode[] children, int defaultChild)
nodeId
- the id of this nodemajorityClass
- the majority class of the records in this nodeclassCounts
- the class distribution of the data in this nodesplitAttribute
- the attribute name on which to splitsplitPredicates
- the split predicates used to partition the datachildren
- the children split according to the split valuesdefaultChild
- index of the default child (only evaluated with
PMMLMissingValueStrategy
DEFAULT_CHILDMethod Detail |
---|
public DecisionTreeNode getDefaultChild()
public int getDefaultChildIndex()
public void setDefaultChild(int defaultChild)
defaultChild
- the defaultChild to setpublic LinkedHashMap<DataCell,Double> getClassCounts(DataRow row, DataTableSpec spec) throws Exception
getClassCounts
in class DecisionTreeNodeSplit
row
- input patternspec
- the corresponding table spec
Exception
- if something went wrong (unknown attriubte for example)public LinkedHashMap<DataCell,Double> getClassCounts(DataCell cell, DataRow row, DataTableSpec spec) throws Exception
getClassCounts
in class DecisionTreeNodeSplit
cell
- the call to be used for classification at this noderow
- input patternspec
- the corresponding table spec
Exception
- if something went wrong (unknown attriubte for example)public void addCoveredPattern(DataCell cell, DataRow row, DataTableSpec spec, double weight) throws Exception
addCoveredPattern
in class DecisionTreeNodeSplit
cell
- the cell to be used for classification at this noderow
- input patternspec
- the corresponding table specweight
- the weight of this row (between 0.0 and 1.0)
Exception
- if something went wrong (unknown attribute for example)public void addCoveredColor(DataCell cell, DataRow row, DataTableSpec spec, double weight) throws Exception
addCoveredColor
in class DecisionTreeNodeSplit
cell
- the call to be used for classification at this noderow
- input patternspec
- the corresponding table specweight
- the weight of this row (between 0.0 and 1.0)
Exception
- if something went wrong (unknown attribute for example)public Set<RowKey> coveredPattern()
coveredPattern
in class DecisionTreeNodeSplit
public void loadNodeSplitInternalsFromPredParams(ModelContentRO pConf) throws InvalidSettingsException
loadNodeSplitInternalsFromPredParams
in class DecisionTreeNodeSplit
pConf
- configuration object to load decision tree from.
InvalidSettingsException
- if something goes wrongpublic void saveNodeSplitInternalsToPredParams(ModelContentWO pConf)
saveNodeSplitInternalsToPredParams
in class DecisionTreeNodeSplit
pConf
- configuration object to save decision tree topublic String getStringSummary()
getStringSummary
in class DecisionTreeNode
public PMMLPredicate[] getSplitPred()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |