|
||||||||||
| 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, coveredColors, createNewNode, createNodeFromPredictorParams, getClassCounts, getCustomData, getEntireClassCount, getMajorityClass, getOverallColorCount, getOwnClassCount, getOwnIndex, getParent, getPrefix, getWinnerAndClasscounts, 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 values
public 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_CHILD| Method Detail |
|---|
public DecisionTreeNode getDefaultChild()
public int getDefaultChildIndex()
public void setDefaultChild(int defaultChild)
defaultChild - the defaultChild to set
public LinkedHashMap<DataCell,Double> getClassCounts(DataRow row,
DataTableSpec spec)
getClassCounts in class DecisionTreeNodeSplitrow - input patternspec - the corresponding table spec
public LinkedHashMap<DataCell,Double> getClassCounts(DataCell cell,
DataRow row,
DataTableSpec spec)
getClassCounts in class DecisionTreeNodeSplitcell - the call to be used for classification at this noderow - input patternspec - the corresponding table spec
public void addCoveredPattern(DataCell cell,
DataRow row,
DataTableSpec spec,
double weight)
throws Exception
addCoveredPattern in class DecisionTreeNodeSplitcell - 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 DecisionTreeNodeSplitcell - 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 DecisionTreeNodeSplitpConf - configuration object to load decision tree from.
InvalidSettingsException - if something goes wrongpublic void saveNodeSplitInternalsToPredParams(ModelContentWO pConf)
saveNodeSplitInternalsToPredParams in class DecisionTreeNodeSplitpConf - configuration object to save decision tree topublic String getStringSummary()
getStringSummary in class DecisionTreeNodepublic PMMLPredicate[] getSplitPred()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||