public class ConfusionMatrix2 extends Iced
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfusionMatrix2.ErrMetric |
| Modifier and Type | Field and Description |
|---|---|
long[][] |
_arr |
double[] |
_classErr |
double |
_predErr |
| Constructor and Description |
|---|
ConfusionMatrix2(int n) |
ConfusionMatrix2(long[][] value) |
ConfusionMatrix2(long[][] value,
int dim) |
| Modifier and Type | Method and Description |
|---|---|
double |
accuracy()
The percentage of predictions that are correct.
|
void |
add(ConfusionMatrix2 other) |
void |
add(int i,
int j) |
double[] |
classErr() |
double |
classErr(int c) |
long |
classErrCount(int c) |
double |
err() |
long |
errCount() |
double |
F0point5()
Returns the F-measure which combines precision and recall and weights precision higher than recall.
|
double |
F1()
Returns the F-measure which combines precision and recall.
|
double |
F2()
Returns the F-measure which combines precision and recall and weights recall higher than precision.
|
boolean |
isBinary() |
double |
max_per_class_error()
The maximum per-class error
|
double |
mcc()
The Matthews Correlation Coefficient, takes true negatives into account in contrast to F-Score
See MCC
MCC = Correlation between observed and predicted binary classification
|
int |
nclasses() |
double |
precision()
The percentage of positive predictions that are correct.
|
double |
recall()
The percentage of positive labeled instances that were predicted as positive.
|
void |
reComputeErrors() |
int |
size() |
double |
specificity()
The percentage of negative labeled instances that were predicted as negative.
|
java.lang.String |
toString() |
long |
totalRows() |
clone, frozenType, read_impl, read, readExternal, readJSON_impl, readJSON, write_impl, write, writeExternal, writeHTML_impl, writeHTML, writeJSON_impl, writeJSONpublic long[][] _arr
public final double[] _classErr
public double _predErr
public ConfusionMatrix2(int n)
public ConfusionMatrix2(long[][] value)
public ConfusionMatrix2(long[][] value,
int dim)
public void add(int i,
int j)
public double[] classErr()
public final int size()
public void reComputeErrors()
public final long classErrCount(int c)
public final double classErr(int c)
public long totalRows()
public void add(ConfusionMatrix2 other)
public double err()
public long errCount()
public double accuracy()
public double specificity()
public double recall()
public double precision()
public double mcc()
public double max_per_class_error()
public final int nclasses()
public final boolean isBinary()
public double F1()
public double F2()
public double F0point5()
public java.lang.String toString()
toString in class java.lang.Object