Package smile.validation.metric
Class RMSE
java.lang.Object
smile.validation.metric.RMSE
- All Implemented Interfaces:
Serializable
,RegressionMetric
Root mean squared error.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
instance
Default instance.
-
-
Constructor Details
-
RMSE
public RMSE()
-
-
Method Details
-
score
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 interfaceRegressionMetric
- Parameters:
truth
- the true response values.prediction
- the predicted response values.- Returns:
- the metric.
-
of
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
-