Package smile.validation.metric
Class Error
java.lang.Object
smile.validation.metric.Error
- All Implemented Interfaces:
Serializable,ToDoubleBiFunction<int[],,int[]> ClassificationMetric
The number of errors in the population.
- See Also:
-
Field Details
-
instance
Default instance.
-
-
Constructor Details
-
Error
public Error()
-
-
Method Details
-
score
public double score(int[] truth, int[] prediction) Description copied from interface:ClassificationMetricReturns a score to measure the quality of classification.- Specified by:
scorein interfaceClassificationMetric- Parameters:
truth- the true class labels.prediction- the predicted class labels.- Returns:
- the metric.
-
of
public static int of(int[] truth, int[] prediction) Calculates the number of errors.- Parameters:
truth- the ground truth.prediction- the prediction.- Returns:
- the metric.
-
toString
-