org.apache.lens.ml.spark.models
Class SparkDecisionTreeModel

java.lang.Object
  extended by 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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparkDecisionTreeModel

public SparkDecisionTreeModel(org.apache.spark.mllib.tree.model.DecisionTreeModel model)
Instantiates a new spark decision tree model.

Parameters:
model - the model
Method Detail

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.