Package smile.validation.metric
Interface ClassificationMetric
- All Superinterfaces:
Serializable
,ToDoubleBiFunction<int[],
int[]>
- All Known Implementing Classes:
Accuracy
,Error
,Fallout
,FDR
,FScore
,MatthewsCorrelation
,Precision
,Recall
,Sensitivity
,Specificity
An abstract interface to measure the classification performance.
-
Method Summary
Modifier and TypeMethodDescriptiondefault double
applyAsDouble
(int[] truth, int[] prediction) double
score
(int[] truth, int[] prediction) Returns a score to measure the quality of classification.
-
Method Details
-
score
double score(int[] truth, int[] prediction) Returns a score to measure the quality of classification.- Parameters:
truth
- the true class labels.prediction
- the predicted class labels.- Returns:
- the metric.
-
applyAsDouble
default double applyAsDouble(int[] truth, int[] prediction) - Specified by:
applyAsDouble
in interfaceToDoubleBiFunction<int[],
int[]>
-