Mean Squared Error
Functions
mean_squared_error(Y, Y_hat)
Calculate the mean squared error loss.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Y |
ndarray
|
True values. |
required |
Y_hat |
ndarray
|
Predicted values. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
The mean squared error between Y and Y_hat. |
Example
Note
This function computes the average squared difference between the true values and the predicted values.