org.apache.lens.ml.spark.models
Class SparkDecisionTreeModel
java.lang.Object
org.apache.lens.ml.spark.models.SparkDecisionTreeModel
- All Implemented Interfaces:
- Serializable, org.apache.spark.mllib.classification.ClassificationModel
public class SparkDecisionTreeModel
- extends Object
- implements org.apache.spark.mllib.classification.ClassificationModel
This class is created because the Spark decision tree model doesn't extend ClassificationModel.
- See Also:
- Serialized Form
Constructor Summary |
SparkDecisionTreeModel(org.apache.spark.mllib.tree.model.DecisionTreeModel model)
Instantiates a new spark decision tree model. |
Method Summary |
org.apache.spark.api.java.JavaRDD<Double> |
predict(org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> testData)
|
org.apache.spark.rdd.RDD<Object> |
predict(org.apache.spark.rdd.RDD<org.apache.spark.mllib.linalg.Vector> testData)
|
double |
predict(org.apache.spark.mllib.linalg.Vector testData)
|
SparkDecisionTreeModel
public SparkDecisionTreeModel(org.apache.spark.mllib.tree.model.DecisionTreeModel model)
- Instantiates a new spark decision tree model.
- Parameters:
model
- the model
predict
public org.apache.spark.rdd.RDD<Object> predict(org.apache.spark.rdd.RDD<org.apache.spark.mllib.linalg.Vector> testData)
- Specified by:
predict
in interface org.apache.spark.mllib.classification.ClassificationModel
predict
public double predict(org.apache.spark.mllib.linalg.Vector testData)
- Specified by:
predict
in interface org.apache.spark.mllib.classification.ClassificationModel
predict
public org.apache.spark.api.java.JavaRDD<Double> predict(org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> testData)
- Specified by:
predict
in interface org.apache.spark.mllib.classification.ClassificationModel
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.