Package smile.validation.metric
Class RSS
java.lang.Object
smile.validation.metric.RSS
- All Implemented Interfaces:
Serializable
,ToDoubleBiFunction<double[],
,double[]> RegressionMetric
Residual sum of squares.
- See Also:
-
Field Details
-
instance
Default instance.
-
-
Constructor Details
-
RSS
public RSS()
-
-
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 residual sum of squares.- Parameters:
truth
- the ground truth.prediction
- the prediction.- Returns:
- the metric.
-
toString
-