We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f7e351 commit 50dfa86Copy full SHA for 50dfa86
examples/linear_model/plot_ols.py
@@ -50,9 +50,9 @@
50
51
# The coefficients
52
print('Coefficients: \n', regr.coef_)
53
-# The mean square error
54
-print("Residual sum of squares: %.2f"
55
- % np.sum((regr.predict(diabetes_X_test) - diabetes_y_test) ** 2))
+# The mean squared error
+print("Mean squared error: %.2f"
+ % np.mean((regr.predict(diabetes_X_test) - diabetes_y_test) ** 2))
56
# Explained variance score: 1 is perfect prediction
57
print('Variance score: %.2f' % regr.score(diabetes_X_test, diabetes_y_test))
58
0 commit comments