|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.classifier.ConfusionMatrix
public class ConfusionMatrix
The ConfusionMatrix Class stores the result of Classification of a Test Dataset. The fact of whether there is a default is not stored. A row of zeros is the only indicator that there is no default. See http://en.wikipedia.org/wiki/Confusion_matrix for background
Constructor Summary | |
---|---|
ConfusionMatrix(Collection<String> labels,
String defaultLabel)
|
|
ConfusionMatrix(Matrix m)
|
Method Summary | |
---|---|
void |
addInstance(String correctLabel,
ClassifierResult classifiedResult)
|
void |
addInstance(String correctLabel,
String classifiedLabel)
|
double |
getAccuracy()
|
double |
getAccuracy(String label)
|
int[][] |
getConfusionMatrix()
|
int |
getCorrect(String label)
|
int |
getCount(String correctLabel,
String classifiedLabel)
|
String |
getDefaultLabel()
|
double |
getKappa()
Accuracy v.s. |
Collection<String> |
getLabels()
|
Matrix |
getMatrix()
|
RunningAverageAndStdDev |
getNormalizedStats()
Standard deviation of normalized producer accuracy Not a standard score |
double |
getReliability()
|
int |
getTotal(String label)
|
void |
incrementCount(String correctLabel,
String classifiedLabel)
|
void |
incrementCount(String correctLabel,
String classifiedLabel,
int count)
|
ConfusionMatrix |
merge(ConfusionMatrix b)
|
void |
putCount(String correctLabel,
String classifiedLabel,
int count)
|
void |
setMatrix(Matrix m)
|
String |
toString()
This is overloaded. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfusionMatrix(Collection<String> labels, String defaultLabel)
public ConfusionMatrix(Matrix m)
Method Detail |
---|
public int[][] getConfusionMatrix()
public Collection<String> getLabels()
public double getAccuracy(String label)
public double getAccuracy()
public double getReliability()
public double getKappa()
public RunningAverageAndStdDev getNormalizedStats()
public int getCorrect(String label)
public int getTotal(String label)
public void addInstance(String correctLabel, ClassifierResult classifiedResult)
public void addInstance(String correctLabel, String classifiedLabel)
public int getCount(String correctLabel, String classifiedLabel)
public void putCount(String correctLabel, String classifiedLabel, int count)
public String getDefaultLabel()
public void incrementCount(String correctLabel, String classifiedLabel, int count)
public void incrementCount(String correctLabel, String classifiedLabel)
public ConfusionMatrix merge(ConfusionMatrix b)
public Matrix getMatrix()
public void setMatrix(Matrix m)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |