public class DecisionTreeModel
extends Object
implements scala.Serializable
Constructor and Description |
---|
DecisionTreeModel(Node topNode,
scala.Enumeration.Value algo) |
Modifier and Type | Method and Description |
---|---|
scala.Enumeration.Value |
algo() |
int |
depth()
Get depth of tree.
|
int |
numNodes()
Get number of nodes in tree, including leaf nodes.
|
JavaRDD<Object> |
predict(JavaRDD<Vector> features)
Predict values for the given data set using the model trained.
|
RDD<Object> |
predict(RDD<Vector> features)
Predict values for the given data set using the model trained.
|
double |
predict(Vector features)
Predict values for a single data point using the model trained.
|
String |
toDebugString()
Print the full model to a string.
|
Node |
topNode() |
String |
toString()
Print a summary of the model.
|
public DecisionTreeModel(Node topNode, scala.Enumeration.Value algo)
public Node topNode()
public scala.Enumeration.Value algo()
public double predict(Vector features)
features
- array representing a single data pointpublic RDD<Object> predict(RDD<Vector> features)
features
- RDD representing data points to be predictedpublic JavaRDD<Object> predict(JavaRDD<Vector> features)
features
- JavaRDD representing data points to be predictedpublic int numNodes()
public int depth()
public String toString()
toString
in class Object
public String toDebugString()