Issue
why negative mean absolute error, and not just mean absolute error, what is the significance of negative mean absolute error over mean absolute error?
from sklearn.model_selection import cross_val_score
cv_mae=-cross_val_score(lm,
x_train,y_train,
cv=10,
scoring='neg_mean_absolute_error')
cv_mae
Solution
Sklearn optimization algorithms aim to maximize metrics. As a result, if a metric is supposed to be minimized, they have a negative sign in sklearn.
Answered By - Andrey Lukyanenko
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.