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.StandardEvaluationMetricComputes 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.TDoubleListm_Actualthe collected actual.protected gnu.trove.list.TDoubleListm_Predictedthe collected predicted.
-
Constructor Summary
Constructors Constructor Description AbstractSimpleRegressionMeasure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanappliesToNominalClass()Return true if this evaluation metric can be computed when the class is nominalbooleanappliesToNumericClass()Return true if this evaluation metric can be computed when the class is numericvoidupdateStatsForClassifier(double[] predictedDistribution, weka.core.Instance instance)Ignored.voidupdateStatsForPredictor(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:
appliesToNominalClassin 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:
appliesToNumericClassin 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 ExceptionIgnored.- Specified by:
updateStatsForClassifierin 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 ExceptionUpdates 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:
updateStatsForPredictorin 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
-
-