Repository navigation
DOC improve conventions used in MAPE - #30012
Conversation
glemaitre
left a comment
There was a problem hiding this comment.
Here, a couple of feedbacks
| MAPE output is a relative measure of error that does not have an upper bound, unlike typical percentages. | ||
| It can return values greater than 1 (e.g., 2 representing a 200% error). For example, an error of 1 | ||
| represents a 100% deviation from the true value. Read more in the | ||
| :ref:`User Guide <mean_absolute_percentage_error>`. |
There was a problem hiding this comment.
The first sentence is incorrect: typical percentage can exceed 100%. Also you need to make sure to not have more than 88 characters per line and no trailing space.
This is the reason for the linter CI to raise error.
Here is my suggestion to keep the docstring short.
| MAPE output is a relative measure of error that does not have an upper bound, unlike typical percentages. | |
| It can return values greater than 1 (e.g., 2 representing a 200% error). For example, an error of 1 | |
| represents a 100% deviation from the true value. Read more in the | |
| :ref:`User Guide <mean_absolute_percentage_error>`. | |
| Note that we are not using the common "percentage" definition: the percentage | |
| in the range [0, 100] is converted to a relative value in the range [0, 1] | |
| by dividing by 100. Thus, an error of 200% corresponds to a relative error of 2. | |
| Read more in the :ref:`User Guide <mean_absolute_percentage_error>`. |
| For example, if the true value is 1 and the predicted value is 2, the MAPE will be 1 (or 100% error). | ||
| Similarly, if the true value is 1 and the predicted value is 3, the MAPE will be 2 (or 200% error). |
There was a problem hiding this comment.
We should not document it here. Instead we should amend the note below (this is currently incorrect).
You can reuse part of my other suggestion to amend it.
There was a problem hiding this comment.
Sure @glemaitre, I will implement this fix.
glemaitre
left a comment
There was a problem hiding this comment.
I pushed a fix. The rendering looks good.
Enabling auto-merge.
|
Thanks @Rachit23110261 |
Co-authored-by: Guillaume Lemaitre <[email protected]>
Reference Issues/PRs
Fixes #30008.
What does this implement/fix? Explain your changes.
This pull request addresses an issue in the documentation related to the Mean Absolute Percentage Error (MAPE) formula. The following changes have been made:
These changes aim to improve user understanding and align the documentation with the intended use of the MAPE metric.
Any other comments?
Please feel free to reach out if there are any questions or if further adjustments are required. I appreciate your time and attention to this contribution.