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 TypeMethodDescriptiondoubleReturns the balanced error rate, i.e., the mean of the per label recalls.doubleReturns the number of times labeltruthwas predicted as labelpredicted.doubleReturns the F_1 score, i.e., the harmonic mean of the precision and recall.doublefn()Returns the micro averaged number of false negatives.doubleReturns the number of false negatives, i.e., the number of times the true label was incorrectly predicted as another label.doublefp()Returns the micro average of the number of false positives across all the labels, i.e., the total number of false positives.doubleReturns 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.doubleReturns the macro averaged F_1 across all the labels.doubleReturns the macro averaged precision.doubleReturns the macro averaged recall.doublemacroFN()Returns the macro averaged number of false negatives.doublemacroFP()Returns the macro averaged number of false positives, averaged across the labels.doublemacroTN()Returns the macro averaged number of true negatives.doublemacroTP()Returns the macro averaged number of true positives, averaged across the labels.doubleReturns the micro averaged F_1 across all labels.doubleReturns the micro averaged precision.doubleReturns the micro averaged recall.doubleReturns the precision of this label, i.e., the number of true positives divided by the number of true positives plus false positives.doubleReturns the recall of this label, i.e., the number of true positives divided by the number of true positives plus false negatives.doubletn()Returns the total number of true negatives.doubleReturns the number of true negatives for that label, i.e., the number of times it wasn't predicted, and was not the true label.doubletp()Returns the micro average of the number of true positives across all the labels, i.e., the total number of true positives.doubleReturns 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, getPredictionsMethods 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.
-