October 2018
Intermediate to advanced
172 pages
4h 6m
English
The mean squared error is given by the following formula:

The preceding formula is similar to the formula that we saw for the mean absolute error, except that instead of computing the absolute difference between the true and predicted output values, we compute the square of the difference.
In order to implement the MSE in scikit-learn, we use the following code:
metrics.mean_squared_error(target, predictions)
We use the mean_squared_error() function from the metrics module, with the real/true output values and the predictions as arguments. The mean squared error is better at detecting larger errors, because ...
Read now
Unlock full access