Skip to content

Documentation section 3.4.1.1 has incorrect description that would be correct if the max_loss metric were to be tweaked and renamed #29417

Closed
@artificialfintelligence

Description

@artificialfintelligence

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

  1. 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.

  2. Remove references to max_error from section 3.4.1.1 and replace them with neg_max_error.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions