mean_squared_error#
- cuml.metrics.mean_squared_error(y_true, y_pred, sample_weight=None, multioutput='uniform_average', squared=True)[source]#
Mean squared error regression loss
Be careful when using this metric with float32 inputs as the result can be slightly incorrect because of floating point precision if the input is large enough. float64 will have lower numerical error.
- Parameters:
- y_truearray-like (device or host) shape = (n_samples,)
or (n_samples, n_outputs) Ground truth (correct) target values.
- y_predarray-like (device or host) shape = (n_samples,)
or (n_samples, n_outputs) Estimated target values.
- sample_weightarray-like (device or host) shape = (n_samples,), optional
Sample weights.
- multioutputstring in [‘raw_values’, ‘uniform_average’] (default=’uniform_average’)
or array-like of shape (n_outputs) Defines aggregating of multiple output values. Array-like value defines weights used to average errors. ‘raw_values’ : Returns a full set of errors in case of multioutput input. ‘uniform_average’ : Errors of all outputs are averaged with uniform weight.
- squaredboolean value, optional (default = True)
If True returns MSE value, if False returns RMSE value.
- Returns:
- lossfloat or ndarray of floats
A non-negative floating point value (the best value is 0.0), or an array of floating point values, one for each individual target.