|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.classify.evaluate.ConfusionMatrix
public class ConfusionMatrix
Calculates and prints confusion matrix, accuracy, and precision for a given clasification trial.
Constructor Summary | |
---|---|
ConfusionMatrix(Trial t)
Constructs matrix and calculates values |
Method Summary | |
---|---|
double |
getClassPrior(int classIndex)
Returns the percentage of instances with true label = classIndex |
double |
getConfusionBetween(int class1,
int class2)
Returns percent of time that class2 is true class when class1 is predicted class |
double |
getPrecision(int predictedClassIndex)
Returns the precision of this predicted class |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfusionMatrix(Trial t)
t
- the trial to build matrix fromMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public double getPrecision(int predictedClassIndex)
public double getConfusionBetween(int class1, int class2)
public double getClassPrior(int classIndex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |