public class RegressionNode extends LeafNode
Constructor and Description |
---|
RegressionNode(int size,
double output,
double mean,
double rss)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
deviance()
Returns the deviance of node.
|
java.lang.String |
dot(smile.data.type.StructType schema,
smile.data.type.StructField response,
int id)
Returns a dot representation for visualization.
|
boolean |
equals(java.lang.Object o) |
double |
impurity()
Returns the residual sum of squares.
|
double |
mean()
Returns the mean of response variable.
|
double |
output()
Returns the predicted value.
|
int[] |
toString(smile.data.type.StructType schema,
smile.data.type.StructField response,
InternalNode parent,
int depth,
java.math.BigInteger id,
java.util.List<java.lang.String> lines)
Adds the string representation (R's rpart format) to a collection.
|
public RegressionNode(int size, double output, double mean, double rss)
size
- the number of samples in the nodeoutput
- the predicted value for this node.mean
- the mean of response variable.rss
- the residual sum of squares.public double output()
public double mean()
public double impurity()
public double deviance()
Node
public java.lang.String dot(smile.data.type.StructType schema, smile.data.type.StructField response, int id)
Node
schema
- the schema of dataresponse
- the schema of response variableid
- node idpublic int[] toString(smile.data.type.StructType schema, smile.data.type.StructField response, InternalNode parent, int depth, java.math.BigInteger id, java.util.List<java.lang.String> lines)
Node
schema
- the schema of dataresponse
- the schema of response variableparent
- the parent nodedepth
- the depth of node in the tree. The root node is at depth 0.id
- node idlines
- the collection of node's string representation.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object