Class LabelMetric.Context
java.lang.Object
org.tribuo.evaluation.metrics.MetricContext<Label>
org.tribuo.classification.evaluation.LabelMetric.Context
- Enclosing class:
- LabelMetric
The context for a
LabelMetric
is a ConfusionMatrix
.-
Constructor Summary
ConstructorDescriptionConstructs a context and compute the confusion matrix using the specified model and predictions.Context
(SequenceModel<Label> model, List<Prediction<Label>> predictions) Constructs a context and compute the confusion matrix using the specified model and predictions. -
Method Summary
Methods inherited from class org.tribuo.evaluation.metrics.MetricContext
getModel, getPredictions, getSequenceModel
-
Constructor Details
-
Context
Constructs a context and compute the confusion matrix using the specified model and predictions.- Parameters:
model
- The model.predictions
- The predictions.
-
Context
Constructs a context and compute the confusion matrix using the specified model and predictions.- Parameters:
model
- The model.predictions
- The predictions.
-
-
Method Details
-
getCM
Gets the confusion matrix.- Returns:
- The confusion matrix.
-