Package weka.classifiers.evaluation
Class AbstractSimpleRegressionMeasure
- java.lang.Object
-
- weka.classifiers.evaluation.AbstractEvaluationMetric
-
- weka.classifiers.evaluation.AbstractSimpleRegressionMeasure
-
- All Implemented Interfaces:
Serializable
,weka.classifiers.evaluation.StandardEvaluationMetric
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
-
-
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.
-
Constructor Summary
Constructors Constructor Description AbstractSimpleRegressionMeasure()
-
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 nominalboolean
appliesToNumericClass()
Return true if this evaluation metric can be computed when the class is numericvoid
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
-
-
-
-
Method Detail
-
appliesToNominalClass
public boolean appliesToNominalClass()
Return true if this evaluation metric can be computed when the class is nominal- Specified by:
appliesToNominalClass
in classweka.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 classweka.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 interfaceweka.classifiers.evaluation.StandardEvaluationMetric
- Parameters:
predictedDistribution
- the probabilities assigned to each classinstance
- 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 interfaceweka.classifiers.evaluation.StandardEvaluationMetric
- Parameters:
predictedValue
- the numeric value the classifier predictsinstance
- the instance to be classified- Throws:
Exception
- if the class of the instance is not set
-
-