Definition of cross_val_score function

Hi,
In the module 2 we calculate that the mean error predicted is around ~40k$ but the cross_val_score gave us a score around 0.3. So what is the link between both scores ?
How is mathematicaly define this “cross_val_score” ?

1 Like

In this notebook we pass scoring="neg_mean_absolute_error" to the cross_validate function, but we don’t for the cross_val_score. By default, both functions use the estimator’s score method, which in the case of DecisionTreeRegressor is the coefficient of determination R^2.

You can read for instance this medium post for further information on the mathematical definitions of errors.

1 Like