Interface Prediction

All Known Implementing Classes:
NominalPrediction, NumericPrediction

public interface Prediction
Encapsulates a single evaluatable prediction: the predicted value plus the actual class value.
Version:
$Revision: 8034 $
Author:
Len Trigg (len@reeltwo.com)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Constant representing a missing value.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the actual class value.
    double
    Gets the predicted class value.
    double
    Gets the weight assigned to this prediction.
  • Field Details

    • MISSING_VALUE

      static final double MISSING_VALUE
      Constant representing a missing value. This should have the same value as weka.core.Instance.MISSING_VALUE
  • Method Details

    • weight

      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.
    • actual

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

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