Skip to main content

11 posts tagged with "scikit-learn"

scikit-learn, the Python Library for Machine Learning Models, Data Splits and Metrics

View All Tags

Fixed: "TypeError: got an unexpected keyword argument 'squared'" in scikit-learn mean_squared_error

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

mean_squared_error(y_true, y_pred, squared=False) is how many tutorials calculate RMSE. In scikit-learn 1.9.1 it fails with TypeError: got an unexpected keyword argument 'squared': the argument was deprecated in scikit-learn 1.4 and has since been removed. root_mean_squared_error() does the same calculation.