public class Error extends java.lang.Object implements ClassificationMetric
Modifier and Type | Field and Description |
---|---|
static Error |
instance
Default instance.
|
Constructor and Description |
---|
Error() |
Modifier and Type | Method and Description |
---|---|
static int |
of(int[] truth,
int[] prediction)
Calculates the number of errors.
|
double |
score(int[] truth,
int[] prediction)
Returns a score to measure the quality of classification.
|
java.lang.String |
toString() |
public static final Error instance
public double score(int[] truth, int[] prediction)
ClassificationMetric
score
in interface ClassificationMetric
truth
- the true class labels.prediction
- the predicted class labels.public static int of(int[] truth, int[] prediction)
public java.lang.String toString()
toString
in class java.lang.Object