Description
Describe the issue linked to the documentation
(Very similar to issue #13887 which was reported and fixed 5 years ago, so I have borrowed much of the text.)
In the documentation, section 3.4.1.1. "Common cases: predefined values", the remark:
All scorer objects follow the convention that higher return values are better than lower return values.
is not 100% correct, as the max_error
metric used for regression is not a "greater is better" metric, as far as I can tell.
If I may, I would love to implement the PR myself, as it would be my first time contributing to a large, well-known library.
Suggest a potential alternative/fix
-
I suggest implementing a function named
neg_max_score
which simply returns the negative of the value of max_error; this is a direct analogy to what is done in the case of ‘neg_mean_absolute_error’ and others. A better model has a lower value of mean absolute error, therefore a larger value of the mean absolute error implies a better model. The same is true for maximum error, where it is also the case that a better model is assigned a lower loss. -
Remove references to
max_error
from section 3.4.1.1 and replace them withneg_max_error
.