public class MultiLabelEvaluator extends AbstractEvaluator<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,MultiLabelEvaluation,MultiLabelMetric>
Evaluator
for MultiLabel
problems.
If the dataset contains an unknown MultiLabel (as generated by MultiLabelFactory.getUnknownOutput()
)
or a valid MultiLabel which is outside of the domain of the Model
then the evaluate methods will
throw IllegalArgumentException
with an appropriate message.
Constructor and Description |
---|
MultiLabelEvaluator() |
Modifier and Type | Method and Description |
---|---|
protected org.tribuo.multilabel.evaluation.MultiLabelMetric.Context |
createContext(Model<MultiLabel> model,
List<Prediction<MultiLabel>> predictions)
Create the context needed for evaluation.
|
protected MultiLabelEvaluation |
createEvaluation(org.tribuo.multilabel.evaluation.MultiLabelMetric.Context context,
Map<MetricID<MultiLabel>,Double> results,
EvaluationProvenance provenance)
Create an evaluation for the given results
|
protected Set<MultiLabelMetric> |
createMetrics(Model<MultiLabel> 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
protected Set<MultiLabelMetric> createMetrics(Model<MultiLabel> model)
AbstractEvaluator
OutputInfo
.createMetrics
in class AbstractEvaluator<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,MultiLabelEvaluation,MultiLabelMetric>
model
- The model to inspect.protected org.tribuo.multilabel.evaluation.MultiLabelMetric.Context createContext(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions)
AbstractEvaluator
createContext
in class AbstractEvaluator<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,MultiLabelEvaluation,MultiLabelMetric>
model
- the model that will be evaluatedpredictions
- the predictions that will be evaluatedprotected MultiLabelEvaluation createEvaluation(org.tribuo.multilabel.evaluation.MultiLabelMetric.Context context, Map<MetricID<MultiLabel>,Double> results, EvaluationProvenance provenance)
AbstractEvaluator
createEvaluation
in class AbstractEvaluator<MultiLabel,org.tribuo.multilabel.evaluation.MultiLabelMetric.Context,MultiLabelEvaluation,MultiLabelMetric>
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.