Package weka.classifiers.evaluation
Class RSquared
- java.lang.Object
-
- weka.classifiers.evaluation.AbstractEvaluationMetric
-
- weka.classifiers.evaluation.AbstractSimpleRegressionMeasure
-
- weka.classifiers.evaluation.RSquared
-
- All Implemented Interfaces:
Serializable
,weka.classifiers.evaluation.StandardEvaluationMetric
public class RSquared extends AbstractSimpleRegressionMeasure
Computes the R^2 for regression models.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
Fields inherited from class weka.classifiers.evaluation.AbstractSimpleRegressionMeasure
m_Actual, m_Predicted
-
-
Constructor Summary
Constructors Constructor Description RSquared()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMetricDescription()
Get a short description of this metric (algorithm, forumulas etc.).String
getMetricName()
Get the name of this metricdouble
getStatistic(String statName)
Get the value of the named statisticList<String>
getStatisticNames()
Get a list of the names of the statistics that this metrics computes.String
toSummaryString()
Return a formatted string (suitable for displaying in console or GUI output) containing all the statistics that this metric computes.-
Methods inherited from class weka.classifiers.evaluation.AbstractSimpleRegressionMeasure
appliesToNominalClass, appliesToNumericClass, updateStatsForClassifier, updateStatsForPredictor
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMetricName
public String getMetricName()
Get the name of this metric- Specified by:
getMetricName
in classweka.classifiers.evaluation.AbstractEvaluationMetric
- Returns:
- the name of this metric
-
getMetricDescription
public String getMetricDescription()
Get a short description of this metric (algorithm, forumulas etc.).- Specified by:
getMetricDescription
in classweka.classifiers.evaluation.AbstractEvaluationMetric
- Returns:
- a short description of this metric
-
getStatisticNames
public List<String> getStatisticNames()
Get a list of the names of the statistics that this metrics computes. E.g. an information theoretic evaluation measure might compute total number of bits as well as average bits/instance- Specified by:
getStatisticNames
in classweka.classifiers.evaluation.AbstractEvaluationMetric
- Returns:
- the names of the statistics that this metric computes
-
getStatistic
public double getStatistic(String statName)
Get the value of the named statistic- Specified by:
getStatistic
in classweka.classifiers.evaluation.AbstractEvaluationMetric
- Parameters:
statName
- the name of the statistic to compute the value for- Returns:
- the computed statistic or Utils.missingValue() if the statistic can't be computed for some reason
-
toSummaryString
public String toSummaryString()
Return a formatted string (suitable for displaying in console or GUI output) containing all the statistics that this metric computes.- Returns:
- a formatted string containing all the computed statistics
-
-