Documentation of 'org.neuroph.eval.classification.ClassificationMetrics' Java class
ClassificationMetrics
org.neuroph.eval.classification

Class ClassificationMetrics



  • public final class ClassificationMetrics
    extends java.lang.Object
    Container class for all metrics which use confusion matrix for their computation Based on: http://java-ml.sourceforge.net/api/0.1.7/net/sf/javaml/classification/evaluation/PerformanceMeasure.html http://sourceforge.net/p/java-ml/java-ml-code/ci/a25ddde7c3677da44e47a643f88e32e2c8bbc32f/tree/net/sf/javaml/classification/evaluation/PerformanceMeasure.java http://en.wikipedia.org/wiki/Matthews_correlation_coefficient
    • Constructor Detail

      • ClassificationMetrics

        public ClassificationMetrics(int truePositive,
                                     int trueNegative,
                                     int falsePositive,
                                     int falseNegative)
        Constructs a new measure using arguments TODO: add class to which measure corresponds?
        Parameters:
        truePositive -
        trueNegative -
        falsePositive -
        falseNegative -
    • Method Detail

      • getClassLabel

        public java.lang.String getClassLabel()
        Returns class label for
        Returns:
        class labels
      • setClassLabel

        public void setClassLabel(java.lang.String classLabel)
      • getAccuracy

        public double getAccuracy()
        Calculate and return classification accuracy measure. A number of correct predictions made divided by the total number of predictions made a = ( tp + tn ) / n
        Returns:
        classification accuracy
      • getErrorRate

        public double getErrorRate()
        A number of wrong predictions made divided by the total number of predictions made. Also error = 1 - accuracy
        Returns:
      • getPrecision

        public double getPrecision()
        Calculate and return classification precision measure. A number of correctly classified positive examples divided by the total number of examples that are classified as positive Also known as positive predictive value PPV
        Returns:
        classification precision measure
      • getSensitivity

        public double getSensitivity()
        Calculate and return classification sensitivity (recall, true positive rate) number of correctly classified positive examples divided by the total number of actual positive examples
        Returns:
      • getRecall

        public double getRecall()
      • getSpecificity

        public double getSpecificity()
        Specifity , true negative rate
      • getTotal

        public double getTotal()
        Returns total number of classifications.
        Returns:
        total number of classifications
      • getFalsePositiveRate

        public double getFalsePositiveRate()
      • getFalseNegativeRate

        public double getFalseNegativeRate()
      • getFalseDiscoveryRate

        public double getFalseDiscoveryRate()
      • getMatthewsCorrelationCoefficient

        public double getMatthewsCorrelationCoefficient()
      • getFMeasure

        public double getFMeasure()
        Calculates F-score for beta equal to 1.
        Returns:
        f-score
      • getFMeasure

        public double getFMeasure(int beta)
        Returns the F-score. When recall and precision are zero, this method will return 0.
        Parameters:
        beta -
        Returns:
        f-score
      • getQ9

        public double getQ9()
      • getBalancedClassificationRate

        public double getBalancedClassificationRate()
      • toString

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

        public static ClassificationMetrics.Stats average(ClassificationMetrics[] results)
        Parameters:
        results - list of different metric results computed on different sets of data
        Returns:
        average metrics computed different MetricResults

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.