public interface Predictor<Self> extends Estimator<Self>, WithParameters
A Predictor
calculates predictions for testing data based on the model it learned during
the fit operation (training phase). In order to do that, the implementing class has to provide
a FitOperation
and a PredictDataSetOperation
implementation for the correct types. The
implicit values should be put into the scope of the companion object of the implementing class
to make them retrievable for the Scala compiler.
The pipeline mechanism has been inspired by scikit-learn
Modifier and Type | Method and Description |
---|---|
<Testing,PredictionValue> |
evaluate(DataSet<Testing> testing,
ParameterMap evaluateParameters,
EvaluateDataSetOperation<Self,Testing,PredictionValue> evaluator)
Evaluates the testing data by computing the prediction value and returning a pair of true
label value and prediction value.
|
<Testing,Prediction> |
predict(DataSet<Testing> testing,
ParameterMap predictParameters,
PredictDataSetOperation<Self,Testing,Prediction> predictor)
Predict testing data according the learned model.
|
parameters
<Testing,Prediction> DataSet<Prediction> predict(DataSet<Testing> testing, ParameterMap predictParameters, PredictDataSetOperation<Self,Testing,Prediction> predictor)
PredictDataSetOperation
which contains the prediction
logic.
testing
- Testing data which shall be predictedpredictParameters
- Additional parameters for the predictionpredictor
- PredictDataSetOperation
which encapsulates the prediction logic<Testing,PredictionValue> DataSet<scala.Tuple2<PredictionValue,PredictionValue>> evaluate(DataSet<Testing> testing, ParameterMap evaluateParameters, EvaluateDataSetOperation<Self,Testing,PredictionValue> evaluator)
testing
- evaluateParameters
- evaluator
- Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.