类 NumericPrediction
java.lang.Object
weka.classifiers.evaluation.NumericPrediction
- 所有已实现的接口:
Serializable
,Prediction
,RevisionHandler
Encapsulates an evaluatable numeric prediction: the predicted class value
plus the actual class value.
- 版本:
- $Revision: 1.9 $
- 作者:
- Len Trigg (len@reeltwo.com)
- 另请参阅:
-
字段概要
从接口继承的字段 weka.classifiers.evaluation.Prediction
MISSING_VALUE
-
构造器概要
构造器构造器说明NumericPrediction
(double actual, double predicted) Creates the NumericPrediction object with a default weight of 1.0.NumericPrediction
(double actual, double predicted, double weight) Creates the NumericPrediction object. -
方法概要
修饰符和类型方法说明double
actual()
Gets the actual class value.double
error()
Calculates the prediction error.Returns the revision string.double
Gets the predicted class value.toString()
Gets a human readable representation of this prediction.double
weight()
Gets the weight assigned to this prediction.
-
构造器详细资料
-
NumericPrediction
public NumericPrediction(double actual, double predicted) Creates the NumericPrediction object with a default weight of 1.0.- 参数:
actual
- the actual value, or MISSING_VALUE.predicted
- the predicted value, or MISSING_VALUE.
-
NumericPrediction
public NumericPrediction(double actual, double predicted, double weight) Creates the NumericPrediction object.- 参数:
actual
- the actual value, or MISSING_VALUE.predicted
- the predicted value, or MISSING_VALUE.weight
- the weight assigned to the prediction.
-
-
方法详细资料
-
actual
public double actual()Gets the actual class value.- 指定者:
actual
在接口中Prediction
- 返回:
- the actual class value, or MISSING_VALUE if no prediction was made.
-
predicted
public double predicted()Gets the predicted class value.- 指定者:
predicted
在接口中Prediction
- 返回:
- the predicted class value, or MISSING_VALUE if no prediction was made.
-
weight
public double weight()Gets the weight assigned to this prediction. This is typically the weight of the test instance the prediction was made for.- 指定者:
weight
在接口中Prediction
- 返回:
- the weight assigned to this prediction.
-
error
public double error()Calculates the prediction error. This is defined as the predicted value minus the actual value.- 返回:
- the error for this prediction, or MISSING_VALUE if either the actual or predicted value is missing.
-
toString
Gets a human readable representation of this prediction. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-