Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Mean Squared Error

# 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: #Mean #Squared #Error
ADD COMMENT
Topic
Name
9+5 =