public class NumericPrediction extends java.lang.Object implements Prediction, java.io.Serializable, RevisionHandler
MISSING_VALUE
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
double |
actual()
Gets the actual class value.
|
double |
error()
Calculates the prediction error.
|
java.lang.String |
getRevision()
Returns the revision string.
|
double |
predicted()
Gets the predicted class value.
|
java.lang.String |
toString()
Gets a human readable representation of this prediction.
|
double |
weight()
Gets the weight assigned to this prediction.
|
public NumericPrediction(double actual, double predicted)
actual
- the actual value, or MISSING_VALUE.predicted
- the predicted value, or MISSING_VALUE.public NumericPrediction(double actual, double predicted, double weight)
actual
- the actual value, or MISSING_VALUE.predicted
- the predicted value, or MISSING_VALUE.weight
- the weight assigned to the prediction.public double actual()
actual
in interface Prediction
public double predicted()
predicted
in interface Prediction
public double weight()
weight
in interface Prediction
public double error()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler