abstract static class CARTImpl.DecisionNode extends CARTImpl.Node
Modifier and Type | Field and Description |
---|---|
private PathExtractor |
path
The feature used to find a value from an Item.
|
protected int |
qfalse
Index of Node to go to if the comparison doesn't match.
|
protected int |
qtrue
Index of Node to go to if the comparison matches.
|
value
Constructor and Description |
---|
DecisionNode(String feature,
Object value,
int qtrue,
int qfalse)
Create a new DecisionNode.
|
Modifier and Type | Method and Description |
---|---|
Object |
findFeature(Item item)
Find the feature associated with this DecisionNode
and the given item
|
String |
getFeature()
The feature used to find a value from an Item.
|
int |
getNextNode(Item item)
Returns the next node based upon the
descision determined at this node
|
abstract int |
getNextNode(Object val)
Get the next Node to go to in the CART.
|
dumpBinary, getValue, getValueString, setCreationLine
private PathExtractor path
protected int qfalse
protected int qtrue
public DecisionNode(String feature, Object value, int qtrue, int qfalse)
feature
- the string used to get a value from an Itemvalue
- the value to compare toqtrue
- the Node index to go to if the comparison matchesqfalse
- the Node machine index to go to upon no matchpublic String getFeature()
public Object findFeature(Item item)
item
- the item to start frompublic final int getNextNode(Item item)
item
- the current item.public abstract int getNextNode(Object val)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses