Documentation of 'cc.mallet.classify.evaluate.ConfusionMatrix' Java class
ConfusionMatrix
cc.mallet.classify.evaluate

Class ConfusionMatrix



  • public class ConfusionMatrix
    extends java.lang.Object
    Calculates and prints confusion matrix, accuracy, and precision for a given clasification trial.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ConfusionMatrix(Trial t)
      Constructs matrix and calculates values
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConfusionMatrix

        public ConfusionMatrix(Trial t)
        Constructs matrix and calculates values
        Parameters:
        t - the trial to build matrix from
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getPrecision

        public double getPrecision(int predictedClassIndex)
        Returns the precision of this predicted class
      • getConfusionBetween

        public double getConfusionBetween(int class1,
                                          int class2)
        Returns percent of time that class2 is true class when class1 is predicted class
      • getClassPrior

        public double getClassPrior(int classIndex)
        Returns the percentage of instances with true label = classIndex

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.