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