mean squared error implementation

Solutions on MaxInterview for mean squared error implementation by the best coders in the world

showing results for - "mean squared error implementation"
Leonie
08 Feb 2018
1from sklearn.metrics import mean_squared_error
2  
3# Given values
4Y_true = [1,1,2,2,4# Y_true = Y (original values)
5  
6# calculated values
7Y_pred = [0.6,1.29,1.99,2.69,3.4# Y_pred = Y'
8  
9# Calculation of Mean Squared Error (MSE)
10mean_squared_error(Y_true,Y_pred)
11