Class AbstractSimpleRegressionMeasure

  • All Implemented Interfaces:
    Serializable, weka.classifiers.evaluation.StandardEvaluationMetric
    Direct Known Subclasses:
    Bias, MSLE, RPD, RSquared, SDR

    public abstract class AbstractSimpleRegressionMeasure
    extends weka.classifiers.evaluation.AbstractEvaluationMetric
    implements weka.classifiers.evaluation.StandardEvaluationMetric
    Computes the mean error.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class weka.classifiers.evaluation.AbstractEvaluationMetric

        weka.classifiers.evaluation.AbstractEvaluationMetric.UnknownStatisticException
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected gnu.trove.list.TDoubleList m_Actual
      the collected actual.
      protected gnu.trove.list.TDoubleList m_Predicted
      the collected predicted.
      • Fields inherited from class weka.classifiers.evaluation.AbstractEvaluationMetric

        m_baseEvaluation
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean appliesToNominalClass()
      Return true if this evaluation metric can be computed when the class is nominal
      boolean appliesToNumericClass()
      Return true if this evaluation metric can be computed when the class is numeric
      void updateStatsForClassifier​(double[] predictedDistribution, weka.core.Instance instance)
      Ignored.
      void updateStatsForPredictor​(double predictedValue, weka.core.Instance instance)
      Updates the statistics about a predictors performance for the current test instance.
      • Methods inherited from class weka.classifiers.evaluation.AbstractEvaluationMetric

        getMetricDescription, getMetricName, getPluginMetrics, getStatistic, getStatisticNames, setBaseEvaluation, statisticIsMaximisable
      • Methods inherited from interface weka.classifiers.evaluation.StandardEvaluationMetric

        toSummaryString
    • Field Detail

      • m_Actual

        protected gnu.trove.list.TDoubleList m_Actual
        the collected actual.
      • m_Predicted

        protected gnu.trove.list.TDoubleList m_Predicted
        the collected predicted.
    • Constructor Detail

      • AbstractSimpleRegressionMeasure

        public AbstractSimpleRegressionMeasure()
    • Method Detail

      • appliesToNominalClass

        public boolean appliesToNominalClass()
        Return true if this evaluation metric can be computed when the class is nominal
        Specified by:
        appliesToNominalClass in class weka.classifiers.evaluation.AbstractEvaluationMetric
        Returns:
        true if this evaluation metric can be computed when the class is nominal
      • appliesToNumericClass

        public boolean appliesToNumericClass()
        Return true if this evaluation metric can be computed when the class is numeric
        Specified by:
        appliesToNumericClass in class weka.classifiers.evaluation.AbstractEvaluationMetric
        Returns:
        true if this evaluation metric can be computed when the class is numeric
      • updateStatsForClassifier

        public void updateStatsForClassifier​(double[] predictedDistribution,
                                             weka.core.Instance instance)
                                      throws Exception
        Ignored.
        Specified by:
        updateStatsForClassifier in interface weka.classifiers.evaluation.StandardEvaluationMetric
        Parameters:
        predictedDistribution - the probabilities assigned to each class
        instance - the instance to be classified
        Throws:
        Exception - if the class of the instance is not set
      • updateStatsForPredictor

        public void updateStatsForPredictor​(double predictedValue,
                                            weka.core.Instance instance)
                                     throws Exception
        Updates the statistics about a predictors performance for the current test instance. Gets called when the class is numeric. Implementers need only implement this method if it is not possible to compute their statistics from what is stored in the base Evaluation object.
        Specified by:
        updateStatsForPredictor in interface weka.classifiers.evaluation.StandardEvaluationMetric
        Parameters:
        predictedValue - the numeric value the classifier predicts
        instance - the instance to be classified
        Throws:
        Exception - if the class of the instance is not set