public final class RegressionEvaluator extends AbstractEvaluator<Regressor,org.tribuo.regression.evaluation.RegressionMetric.Context,RegressionEvaluation,RegressionMetric>
Evaluator
for multi-dimensional regression using Regressor
s.
If the dataset contains an unknown Regressor (as generated by RegressionFactory.getUnknownOutput()
)
then the evaluate methods will throw IllegalArgumentException
with an appropriate message.
Constructor and Description |
---|
RegressionEvaluator()
By default, don't use example weights.
|
RegressionEvaluator(boolean useExampleWeights)
Construct an evaluator.
|
Modifier and Type | Method and Description |
---|---|
protected org.tribuo.regression.evaluation.RegressionMetric.Context |
createContext(Model<Regressor> model,
List<Prediction<Regressor>> predictions)
Create the context needed for evaluation.
|
protected RegressionEvaluation |
createEvaluation(org.tribuo.regression.evaluation.RegressionMetric.Context context,
Map<MetricID<Regressor>,Double> results,
EvaluationProvenance provenance)
Create an evaluation for the given results
|
protected Set<RegressionMetric> |
createMetrics(Model<Regressor> model)
Creates the appropriate set of metrics for this model, by querying for it's
OutputInfo . |
computeResults, evaluate, evaluate, evaluate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createOnlineEvaluator, evaluate
public RegressionEvaluator()
public RegressionEvaluator(boolean useExampleWeights)
Will weight the examples if requested.
useExampleWeights
- Set to true to use the example weights to adjust the importance of the predictions.protected Set<RegressionMetric> createMetrics(Model<Regressor> model)
AbstractEvaluator
OutputInfo
.createMetrics
in class AbstractEvaluator<Regressor,org.tribuo.regression.evaluation.RegressionMetric.Context,RegressionEvaluation,RegressionMetric>
model
- The model to inspect.protected org.tribuo.regression.evaluation.RegressionMetric.Context createContext(Model<Regressor> model, List<Prediction<Regressor>> predictions)
AbstractEvaluator
createContext
in class AbstractEvaluator<Regressor,org.tribuo.regression.evaluation.RegressionMetric.Context,RegressionEvaluation,RegressionMetric>
model
- the model that will be evaluatedpredictions
- the predictions that will be evaluatedprotected RegressionEvaluation createEvaluation(org.tribuo.regression.evaluation.RegressionMetric.Context context, Map<MetricID<Regressor>,Double> results, EvaluationProvenance provenance)
AbstractEvaluator
createEvaluation
in class AbstractEvaluator<Regressor,org.tribuo.regression.evaluation.RegressionMetric.Context,RegressionEvaluation,RegressionMetric>
context
- the context that was used to compute these resultsresults
- the resultsprovenance
- the provenance of the results (including information about the model and dataset)Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.