Documentation of 'smile.validation.FMeasure' Java class
FMeasure
smile.validation

Class FMeasure

  • All Implemented Interfaces:
    ClassificationMeasure


    public class FMeasure
    extends java.lang.Object
    implements ClassificationMeasure
    The F-score (or F-measure) considers both the precision and the recall of the test to compute the score. The precision p is the number of correct positive results divided by the number of all positive results, and the recall r is the number of correct positive results divided by the number of positive results that should have been returned. The traditional or balanced F-score (F1 score) is the harmonic mean of precision and recall, where an F1 score reaches its best value at 1 and worst at 0. The general formula involves a positive real β so that F-score measures the effectiveness of retrieval with respect to a user who attaches β times as much importance to recall as precision.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FMeasure()
      Constructor of F1 score.
      FMeasure(double beta)
      Constructor of general F-score.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double measure(int[] truth, int[] prediction)
      Returns an index to measure the quality of classification.
      • Methods inherited from class java.lang.Object

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

      • FMeasure

        public FMeasure()
        Constructor of F1 score.
      • FMeasure

        public FMeasure(double beta)
        Constructor of general F-score.
        Parameters:
        beta - a positive value such that F-score measures the effectiveness of retrieval with respect to a user who attaches β times as much importance to recall as precision.
    • Method Detail

      • measure

        public double measure(int[] truth,
                              int[] prediction)
        Description copied from interface: ClassificationMeasure
        Returns an index to measure the quality of classification.
        Specified by:
        measure in interface ClassificationMeasure
        Parameters:
        truth - the true class labels.
        prediction - the predicted class labels.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.