All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.evaluation.NumericPrediction

java.lang.Object
   |
   +----weka.classifiers.evaluation.NumericPrediction

public class NumericPrediction
extends Object
implements Prediction, Serializable
Encapsulates an evaluatable numeric prediction: the predicted class value plus the actual class value.

Author:
Len Trigg (len@intelligenesis.net)

Constructor Index

 o NumericPrediction(double, double)
Creates the NumericPrediction object with a default weight of 1.0.
 o NumericPrediction(double, double, double)
Creates the NumericPrediction object.

Method Index

 o actual()
Gets the actual class value.
 o error()
Calculates the prediction error.
 o predicted()
Gets the predicted class value.
 o toString()
Gets a human readable representation of this prediction.
 o weight()
Gets the weight assigned to this prediction.

Constructors

 o NumericPrediction
 public NumericPrediction(double actual,
                          double predicted)
Creates the NumericPrediction object with a default weight of 1.0.

Parameters:
actual - the actual value, or MISSING_VALUE.
predicted - the predicted value, or MISSING_VALUE.
 o NumericPrediction
 public NumericPrediction(double actual,
                          double predicted,
                          double weight)
Creates the NumericPrediction object.

Parameters:
actual - the actual value, or MISSING_VALUE.
predicted - the predicted value, or MISSING_VALUE.
weight - the weight assigned to the prediction.

Methods

 o actual
 public double actual()
Gets the actual class value.

Returns:
the actual class value, or MISSING_VALUE if no prediction was made.
 o predicted
 public double predicted()
Gets the predicted class value.

Returns:
the predicted class value, or MISSING_VALUE if no prediction was made.
 o 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.

Returns:
the weight assigned to this prediction.
 o error
 public double error()
Calculates the prediction error. This is defined as the predicted value minus the actual value.

Returns:
the error for this prediction, or MISSING_VALUE if either the actual or predicted value is missing.
 o toString
 public String toString()
Gets a human readable representation of this prediction.

Returns:
a human readable representation of this prediction.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home