public static class ConfusionMatrixGenerator.ConfusionMatrix extends Object
Map
representing the linearized matrixModifier and Type | Method and Description |
---|---|
double |
getAccuracy()
Calculate accuracy on this confusion matrix using the formula:
accuracy = correctly-classified / (correctly-classified + wrongly-classified)
|
double |
getAvgClassificationTime()
get the average classification time in milliseconds
|
double |
getF1Measure()
get the F-1 measure on this confusion matrix
|
double |
getF1Measure(String klass)
get the F-1 measure of the given class
|
Map<String,Map<String,Long>> |
getLinearizedMatrix()
get the linearized confusion matrix as a
Map |
int |
getNumberOfEvaluatedDocs()
get the no.
|
double |
getPrecision()
get the macro averaged precision (see
getPrecision(String) ) over all the classes. |
double |
getPrecision(String klass)
calculate precision on the given class
|
double |
getRecall()
get the macro averaged recall (see
getRecall(String) ) over all the classes |
double |
getRecall(String klass)
calculate recall on the given class
|
String |
toString() |
public Map<String,Map<String,Long>> getLinearizedMatrix()
Map
Map
whose keys are the correct classification answers and whose values are the actual answers'
countspublic double getPrecision(String klass)
klass
- the class to calculate the precision forpublic double getRecall(String klass)
klass
- the class to calculate the recall forpublic double getF1Measure(String klass)
klass
- the class to calculate the F-1 measure forpublic double getF1Measure()
public double getAccuracy()
public double getPrecision()
getPrecision(String)
) over all the classes.public double getRecall()
getRecall(String)
) over all the classespublic double getAvgClassificationTime()
public int getNumberOfEvaluatedDocs()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.