类 NumericPrediction

java.lang.Object
weka.classifiers.evaluation.NumericPrediction
所有已实现的接口:
Serializable, Prediction, RevisionHandler

public class NumericPrediction extends Object implements Prediction, Serializable, 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
    Gets the actual class value.
    double
    Calculates the prediction error.
    Returns the revision string.
    double
    Gets the predicted class value.
    Gets a human readable representation of this prediction.
    double
    Gets the weight assigned to this prediction.

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 构造器详细资料

    • 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

      public String toString()
      Gets a human readable representation of this prediction.
      覆盖:
      toString 在类中 Object
      返回:
      a human readable representation of this prediction.
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision