InputType
- The input type of the decision tree to evaluateOutputType
- The output type that the decision tree returns.public interface DecisionTreeNode<InputType,OutputType> extends CloneableSerializable
DecisionTreeNode
interface defines the functionality of a node
in a decision tree. In particular, it defines how to get the child nodes
plus how to get the output for a leaf node.Modifier and Type | Method and Description |
---|---|
DecisionTreeNode<InputType,OutputType> |
chooseChild(InputType input)
Chooses the child node corresponding to the given input.
|
java.util.Collection<? extends DecisionTreeNode<InputType,OutputType>> |
getChildren()
Gets the collection of children of the node.
|
int |
getDepth()
Gets the depth of the node in the tree.
|
java.lang.Object |
getIncomingValue()
Gets the label of the incoming value to the node.
|
OutputType |
getOutput(InputType input)
Gets the local output of this node for the given input.
|
DecisionTreeNode<InputType,OutputType> |
getParent()
Gets the parent node for this node.
|
int |
getTreeSize()
Gets the size of the sub-tree from this node.
|
boolean |
isLeaf()
Returns true if this node is a leaf node (has no children) and false
otherwise.
|
clone
DecisionTreeNode<InputType,OutputType> getParent()
java.util.Collection<? extends DecisionTreeNode<InputType,OutputType>> getChildren()
boolean isLeaf()
DecisionTreeNode<InputType,OutputType> chooseChild(InputType input)
input
- The input.OutputType getOutput(InputType input)
input
- The input.java.lang.Object getIncomingValue()
int getDepth()
int getTreeSize()