Class RMSE

java.lang.Object
smile.validation.metric.RMSE
All Implemented Interfaces:
Serializable, ToDoubleBiFunction<double[],double[]>, RegressionMetric

public class RMSE extends Object implements RegressionMetric
Root mean squared error.
See Also:
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final RMSE
    Default instance.
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static double
    of(double[] truth, double[] prediction)
    Calculates the root mean squared error.
    double
    score(double[] truth, double[] prediction)
    Returns a score to measure the quality of regression.
     

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface smile.validation.metric.RegressionMetric Link icon

    applyAsDouble
  • Field Details Link icon

    • instance Link icon

      public static final RMSE instance
      Default instance.
  • Constructor Details Link icon

    • RMSE Link icon

      public RMSE()
      Constructor.
  • Method Details Link icon

    • score Link icon

      public double score(double[] truth, double[] prediction)
      Description copied from interface: RegressionMetric
      Returns a score to measure the quality of regression.
      Specified by:
      score in interface RegressionMetric
      Parameters:
      truth - the true response values.
      prediction - the predicted response values.
      Returns:
      the metric.
    • of Link icon

      public static double of(double[] truth, double[] prediction)
      Calculates the root mean squared error.
      Parameters:
      truth - the ground truth.
      prediction - the prediction.
      Returns:
      the metric.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object