Enum Measure

    • Enum Constant Detail

      • ACC

        public static final Measure ACC
        Accuracy.
      • CC

        public static final Measure CC
        Correlation coefficient.
      • MAE

        public static final Measure MAE
        Mean absolute error.
      • MSLE

        public static final Measure MSLE
        Mean squared logarithmic error.
      • RAE

        public static final Measure RAE
        Relative absolute error.
      • RMSE

        public static final Measure RMSE
        Root mean squared error.
      • RRSE

        public static final Measure RRSE
        Root relative squared error.
      • RSQUARED

        public static final Measure RSQUARED
        R^2.
      • KAPPA

        public static final Measure KAPPA
        Kappa.
      • FALSE_POS_RATE

        public static final Measure FALSE_POS_RATE
        false positive rate.
      • FALSE_NEG_RATE

        public static final Measure FALSE_NEG_RATE
        false negative rate.
      • TRUE_POS_RATE

        public static final Measure TRUE_POS_RATE
        true positive rate.
      • TRUE_NEG_RATE

        public static final Measure TRUE_NEG_RATE
        true negative rate.
      • F_MEASURE

        public static final Measure F_MEASURE
        F measure.
      • PRECISION

        public static final Measure PRECISION
        precision.
      • RECALL

        public static final Measure RECALL
        recall.
      • AREA_UNDER_ROC

        public static final Measure AREA_UNDER_ROC
        area under receiver operator curve.
      • AREA_UNDER_PRC

        public static final Measure AREA_UNDER_PRC
        area under precision recall curve.
    • Method Detail

      • values

        public static Measure[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Measure c : Measure.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Measure valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • extract

        public double extract​(weka.classifiers.Evaluation evaluation,
                              boolean adjust,
                              int classLabel)
                       throws Exception
        Extracts the measure from the Evaluation object.
        Parameters:
        evaluation - the evaluation to use
        adjust - whether to just the measure
        classLabel - the index of the class label to use (for per-class-label stats)
        Returns:
        the measure
        Throws:
        Exception - in case the retrieval of the measure fails
        See Also:
        adjust(double)
      • adjust

        public double adjust​(double measure)
        Adjusts the measure value for sorting: either multiplies it with -1 or 1.
        Parameters:
        measure - the raw measure
        Returns:
        the adjusted measure
      • isValid

        public String isValid​(weka.core.Instances data,
                              String index)
        Checks whether the data can be used with this measure.
        Parameters:
        data - the data to check
        index - the index for per-class-label measures
        Returns:
        null if valid, otherwise error message
      • isPerClassLabel

        public boolean isPerClassLabel()
        Returns whether the measure is per class label.
        Returns:
        true if per class label