pyufunc.mean_squared_error#
- pyufunc.mean_squared_error(y_true, y_pred)#
Calculate mean squared error between y_true and y_pred.
- Parameters:
y_true – Iterable, The true values
y_pred – Iterable, The predicted values
- Raises:
- Returns:
float, The mean squared error
Example
>>> from pyufunc import mean_squared_error >>> y_true = [3, -0.5, 2, 7] >>> y_pred = [2.5, 0.0, 2, 8] >>> mean_squared_error(y_true, y_pred) 0.375