Reputation: 43
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
Upvotes: 0
Views: 464
Reputation: 3851
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.
Upvotes: 1