|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.classifier.ConfusionMatrix
public class ConfusionMatrix
This class holds the confusion matrix of a classifier.
Constructor Summary | |
---|---|
ConfusionMatrix(int classes)
This constructor creates an instance with a given number of classes. |
|
ConfusionMatrix(StringBuffer representation)
This is the constructor for Storable . |
Method Summary | |
---|---|
void |
add(int realClass,
int predictedClass)
This method updates the confusion matrix. |
int[][] |
getMatrix()
This method returns the confusion matrix as a 2D-int-array. |
double |
getMisclassificationRate()
This method returns the misclassification rate. |
StringBuffer |
toXML()
This method returns an XML-representation of an instance of the implementing class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfusionMatrix(int classes)
classes
- the number of classespublic ConfusionMatrix(StringBuffer representation) throws NonParsableException
Storable
.
representation
- the xml representation
NonParsableException
- if the representation could not be parsed.Method Detail |
---|
public void add(int realClass, int predictedClass)
realClass
- the real class indexpredictedClass
- the predicted class indexpublic int[][] getMatrix()
public double getMisclassificationRate()
public StringBuffer toXML()
Storable
toXML
in interface Storable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |