public class LabelSequenceEvaluation extends Object implements SequenceEvaluation<Label>
Modifier | Constructor and Description |
---|---|
protected |
LabelSequenceEvaluation(Map<MetricID<Label>,Double> results,
LabelMetric.Context ctx,
EvaluationProvenance provenance) |
Modifier and Type | Method and Description |
---|---|
double |
accuracy() |
double |
accuracy(Label label) |
Map<MetricID<Label>,Double> |
asMap()
Get a map of all the metrics stored in this evaluation.
|
double |
balancedErrorRate() |
double |
confusion(Label predictedLabel,
Label trueLabel)
Note: confusion is not stored in the underlying map, so it won't show up in aggregation.
|
double |
f1(Label label) |
double |
fn() |
double |
fn(Label label) |
double |
fp() |
double |
fp(Label label) |
ConfusionMatrix<Label> |
getConfusionMatrix()
Gets the confusion matrix backing this evaluation.
|
List<Prediction<Label>> |
getPredictions()
Gets the flattened predictions.
|
EvaluationProvenance |
getProvenance() |
double |
macroAveragedF1() |
double |
macroAveragedPrecision() |
double |
macroAveragedRecall() |
double |
macroFN() |
double |
macroFP() |
double |
macroTN() |
double |
macroTP() |
double |
microAveragedF1() |
double |
microAveragedPrecision() |
double |
microAveragedRecall() |
double |
precision(Label label) |
double |
recall(Label label) |
double |
tn() |
double |
tn(Label label) |
String |
toString() |
double |
tp() |
double |
tp(Label label) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get
protected LabelSequenceEvaluation(Map<MetricID<Label>,Double> results, LabelMetric.Context ctx, EvaluationProvenance provenance)
public List<Prediction<Label>> getPredictions()
public ConfusionMatrix<Label> getConfusionMatrix()
public Map<MetricID<Label>,Double> asMap()
SequenceEvaluation
asMap
in interface SequenceEvaluation<Label>
public double confusion(Label predictedLabel, Label trueLabel)
predictedLabel
- The predicted label.trueLabel
- The true label.predictedLabel
was predicted for trueLabel
.public double tp(Label label)
public double tp()
public double macroTP()
public double fp(Label label)
public double fp()
public double macroFP()
public double tn(Label label)
public double tn()
public double macroTN()
public double fn(Label label)
public double fn()
public double macroFN()
public double precision(Label label)
public double microAveragedPrecision()
public double macroAveragedPrecision()
public double recall(Label label)
public double microAveragedRecall()
public double macroAveragedRecall()
public double f1(Label label)
public double microAveragedF1()
public double macroAveragedF1()
public double accuracy()
public double accuracy(Label label)
public double balancedErrorRate()
public EvaluationProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<EvaluationProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.