T
- The output type.E
- The evaluation type.public final class OnlineEvaluator<T extends Output<T>,E extends Evaluation<T>> extends Object
Evaluation
s
covering all the Prediction
s it has seen or created.Constructor and Description |
---|
OnlineEvaluator(Evaluator<T,E> evaluator,
Model<T> model,
DataProvenance provenance)
Constructs an
OnlineEvaluator which accumulates predictions. |
Modifier and Type | Method and Description |
---|---|
E |
evaluate()
Creates an
Evaluation containing all the current
predictions. |
void |
observe(List<Prediction<T>> newPredictions)
Records all the supplied predictions.
|
void |
observe(Prediction<T> newPrediction)
Records the supplied prediction.
|
Prediction<T> |
predictAndObserve(Example<T> example)
Feeds the example to the model, records the prediction and returns it.
|
List<Prediction<T>> |
predictAndObserve(Iterable<Example<T>> examples)
Feeds the examples to the model, records the predictions and returns them.
|
public OnlineEvaluator(Evaluator<T,E> evaluator, Model<T> model, DataProvenance provenance)
OnlineEvaluator
which accumulates predictions.evaluator
- The evaluator to use to make Evaluation
s.model
- The model to use.provenance
- The provenance of the evaluation data.public E evaluate()
Evaluation
containing all the current
predictions.Evaluation
of the appropriate type.public Prediction<T> predictAndObserve(Example<T> example)
example
- The example to predict.public List<Prediction<T>> predictAndObserve(Iterable<Example<T>> examples)
examples
- The examples to predict.public void observe(Prediction<T> newPrediction)
newPrediction
- The prediction to record.public void observe(List<Prediction<T>> newPredictions)
newPredictions
- The predictions to record.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.