Ich glaube, ich mache einen Fehler in meiner Berechnung von RMSE in reinem Python. Unten ist Code.Python Pure RMSE vs Sklearn
y_true = [3, -0.5, 2, 7]
y_pred = [2.5, 0.0, 2, 8]
e = abs(np.matrix(y_pred) - np.matrix(y_true)).A1
ee = np.dot(e,e)
np.sqrt(ee.sum()/3)
This returns: 0.707
aber wenn ich versuche, mit Sklearn
mean_squared_error(np.matrix(y_true),np.matrix(y_pred))**0.5
This returns: 0.612
Jede Idee, was los ist? Ziemlich sicher, dass mein Python-Code korrekt ist.
Warum teilt sich Sklearn durch 4? – cloud36
@ Cloud36: Schau auf meine Antwort – MMF