public interface PredictOperation<Instance,Model,Testing,Prediction>
extends scala.Serializable
It is sufficient for a Predictor
to only implement this trait to support the evaluate and
predict method.
Modifier and Type | Method and Description |
---|---|
DataSet<Model> |
getModel(Instance instance,
ParameterMap predictParameters)
Defines how to retrieve the model of the type for which this operation was defined
|
Prediction |
predict(Testing value,
Model model)
Calculates the prediction for a single element given the model of the
Predictor . |
DataSet<Model> getModel(Instance instance, ParameterMap predictParameters)
instance
- The Predictor instance that we will use to make the predictionspredictParameters
- The parameters for the predictionPrediction predict(Testing value, Model model)
Predictor
.
value
- The unlabeled example on which we make the predictionmodel
- The model representation of the prediciton algorithmPrediction
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.