Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

mse python

# Needed packages
from sklearn.metrics import mean_squared_error

#  Values to compare
y_true = [3, -0.5, 2, 7] # Observed value
y_pred = [2.5, 0.0, 2, 8] # Predicted value

# Mean squared error
mse = mean_squared_error(y_true, y_pred)

print(mse)
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #mse #python
ADD COMMENT
Topic
Name
1+3 =