public class OrdinalNode extends InternalNode
| Constructor and Description |
|---|
OrdinalNode(int feature,
double value,
double score,
double deviance,
Node trueChild,
Node falseChild)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
branch(smile.data.Tuple x)
Returns true if the instance goes to the true branch.
|
java.lang.String |
dot(smile.data.type.StructType schema,
smile.data.type.StructField response,
int id)
Returns a dot representation for visualization.
|
LeafNode |
predict(smile.data.Tuple x)
Evaluates the tree over an instance.
|
OrdinalNode |
replace(Node trueChild,
Node falseChild)
Returns a new internal node with children replaced.
|
java.lang.String |
toString(smile.data.type.StructType schema,
boolean trueBranch)
Returns the string representation of branch.
|
public LeafNode predict(smile.data.Tuple x)
InternalNodepredict in interface Nodepredict in class InternalNodepublic boolean branch(smile.data.Tuple x)
InternalNodebranch in class InternalNodepublic OrdinalNode replace(Node trueChild, Node falseChild)
InternalNodereplace in class InternalNodepublic java.lang.String dot(smile.data.type.StructType schema,
smile.data.type.StructField response,
int id)
Nodeschema - the schema of dataresponse - the schema of response variableid - node idpublic java.lang.String toString(smile.data.type.StructType schema,
boolean trueBranch)
InternalNodetoString in class InternalNodeschema - the schema of data.trueBranch - for true or false branch.