Interface ClassifierEvaluation<T extends Classifiable<T>>
- Type Parameters:
T
- The output type.
- All Superinterfaces:
Evaluation<T>
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<EvaluationProvenance>
- All Known Subinterfaces:
LabelEvaluation
,MultiLabelEvaluation
- All Known Implementing Classes:
MultiLabelEvaluationImpl
Defines methods that calculate classification performance, used for both multi-class and multi-label classification.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the balanced error rate, i.e., the mean of the per label recalls.double
Returns the number of times labeltruth
was predicted as labelpredicted
.double
Returns the F_1 score, i.e., the harmonic mean of the precision and recall.double
fn()
Returns the micro averaged number of false negatives.double
Returns the number of false negatives, i.e., the number of times the true label was incorrectly predicted as another label.double
fp()
Returns the micro average of the number of false positives across all the labels, i.e., the total number of false positives.double
Returns the number of false positives, i.e., the number of times this label was predicted but it was not the true label..Returns the underlying confusion matrix.double
Returns the macro averaged F_1 across all the labels.double
Returns the macro averaged precision.double
Returns the macro averaged recall.double
macroFN()
Returns the macro averaged number of false negatives.double
macroFP()
Returns the macro averaged number of false positives, averaged across the labels.double
macroTN()
Returns the macro averaged number of true negatives.double
macroTP()
Returns the macro averaged number of true positives, averaged across the labels.double
Returns the micro averaged F_1 across all labels.double
Returns the micro averaged precision.double
Returns the micro averaged recall.double
Returns the precision of this label, i.e., the number of true positives divided by the number of true positives plus false positives.double
Returns the recall of this label, i.e., the number of true positives divided by the number of true positives plus false negatives.double
tn()
Returns the total number of true negatives.double
Returns the number of true negatives for that label, i.e., the number of times it wasn't predicted, and was not the true label.double
tp()
Returns the micro average of the number of true positives across all the labels, i.e., the total number of true positives.double
Returns the number of true positives, i.e., the number of times the label was correctly predicted.Methods inherited from interface org.tribuo.evaluation.Evaluation
asMap, get, getPredictions
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
confusion
-
tp
-
tp
double tp()Returns the micro average of the number of true positives across all the labels, i.e., the total number of true positives.- Returns:
- The micro averaged number of true positives.
-
macroTP
double macroTP()Returns the macro averaged number of true positives, averaged across the labels.- Returns:
- The macro averaged number of true positives.
-
fp
-
fp
double fp()Returns the micro average of the number of false positives across all the labels, i.e., the total number of false positives.- Returns:
- The micro averaged number of false positives.
-
macroFP
double macroFP()Returns the macro averaged number of false positives, averaged across the labels.- Returns:
- The macro averaged number of false positives.
-
tn
-
tn
double tn()Returns the total number of true negatives. This isn't very useful in multiclass problems.- Returns:
- The number of true negatives.
-
macroTN
double macroTN()Returns the macro averaged number of true negatives.- Returns:
- The macro averaged number of true negatives.
-
fn
-
fn
double fn()Returns the micro averaged number of false negatives.- Returns:
- The micro averaged number of false negatives.
-
macroFN
double macroFN()Returns the macro averaged number of false negatives.- Returns:
- The macro averaged number of false negatives.
-
precision
-
microAveragedPrecision
double microAveragedPrecision()Returns the micro averaged precision.- Returns:
- The micro averaged precision.
-
macroAveragedPrecision
double macroAveragedPrecision()Returns the macro averaged precision.- Returns:
- The macro averaged precision.
-
recall
-
microAveragedRecall
-
macroAveragedRecall
-
f1
-
microAveragedF1
-
macroAveragedF1
double macroAveragedF1()Returns the macro averaged F_1 across all the labels.- Returns:
- The F_1 score.
-
balancedErrorRate
double balancedErrorRate()Returns the balanced error rate, i.e., the mean of the per label recalls.- Returns:
- The balanced error rate.
-
getConfusionMatrix
Returns the underlying confusion matrix.- Returns:
- The confusion matrix.
-