org.apache.lens.ml.spark.models
Class BaseSparkClassificationModel<MODEL extends org.apache.spark.mllib.classification.ClassificationModel>

java.lang.Object
  extended by org.apache.lens.ml.MLModel<Double>
      extended by org.apache.lens.ml.ClassifierBaseModel
          extended by org.apache.lens.ml.spark.models.BaseSparkClassificationModel<MODEL>
Type Parameters:
MODEL - the generic type
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DecisionTreeClassificationModel, LogitRegressionClassificationModel, NaiveBayesClassificationModel, SVMClassificationModel

public class BaseSparkClassificationModel<MODEL extends org.apache.spark.mllib.classification.ClassificationModel>
extends ClassifierBaseModel

The Class BaseSparkClassificationModel.

See Also:
Serialized Form

Constructor Summary
BaseSparkClassificationModel(String modelId, MODEL model)
          Instantiates a new base spark classification model.
 
Method Summary
 String getId()
           
 Double predict(Object... args)
          Predict.
 
Methods inherited from class org.apache.lens.ml.ClassifierBaseModel
getFeatureVector
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseSparkClassificationModel

public BaseSparkClassificationModel(String modelId,
                                    MODEL model)
Instantiates a new base spark classification model.

Parameters:
modelId - the model id
model - the model
Method Detail

predict

public Double predict(Object... args)
Description copied from class: MLModel
Predict.

Specified by:
predict in class MLModel<Double>
Parameters:
args - the args
Returns:
the prediction

getId

public String getId()


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.