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.
|
NumericPrediction(double actual,
double predicted,
double weight,
double[][] predInt)
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.
|
double[][] |
predictionIntervals()
Returns the predictions intervals.
|
void |
setPredictionIntervals(double[][] predInt)
Sets the prediction intervals for this prediction.
|
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 NumericPrediction(double actual, double predicted, double weight, double[][] predInt)
actual
- the actual value, or MISSING_VALUE.predicted
- the predicted value, or MISSING_VALUE.weight
- the weight assigned to the prediction.predInt
- the prediction intervals from classifiers implementing
the IntervalEstimator
interface.IntervalEstimator
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 void setPredictionIntervals(double[][] predInt)
predInt
- the prediction intervalspublic double[][] predictionIntervals()
IntervalEstimator
interface.IntervalEstimator
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler