Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[WIP] Add Absolute Mean Percentage Error as available loss function in SGDR… #6605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

maciejjaskowski
Copy link

I am pretty sure I saw someone on scikit-learn github considering adding MAPE as loss function and I wanted to have it anyway, so there it is (although I can't google it back)

If that is useful, I should probably add some tests and/or documentation. Let me know!

@amueller
Copy link
Member

Thanks for the PR and sorry for the slow reply.
I think if we want to minimize MAPE using SGD we might also want to add it to the metrics module.
Would you like to do that?

Also, this needs to be added to the docstrings explaining the possible losses and needs a test that it's actually minimizing mape.

@CaoQi92
Copy link

CaoQi92 commented Nov 29, 2016

I think it's a good idea to adding MAPE as a loss function.
Actually ,I'm considering using it.
Could you please show me some examples about how to use MAPE in scikit-learning?

@jnothman
Copy link
Member

You could load this branch into your working copy, merge it with the current master, install it and use... It would not take a great deal of effort to get this PR to a state where it could be merged, but we won't merge it without appropriate documentation and tests. And as @amueller says, it would be good to have MAPE as an evaluation metric for symmetry.

@amueller
Copy link
Member

Also needs some docs, at least mention in the docstring. Also in whatsnew. Not sure how easy it is to test this as part of SGDClassifier. Maybe hand-designed example?

@amueller amueller added Stalled Superseded PR has been replace by a newer PR labels Aug 5, 2019
Base automatically changed from master to main January 22, 2021 10:49
@thomasjpfan
Copy link
Member

Numerically, I see issues with y==0 and at the point when the derivative is undefined. Are there any references or papers for doing stochastic gradient descent with MAPE as a loss function?

@cmarmo cmarmo added the Needs Decision - Close Requires decision for closing label May 2, 2022
@cmarmo
Copy link
Contributor

cmarmo commented May 2, 2022

@thomasjpfan this pull request was superseded by #10711, itself closed in favor of #15007. Can we close it?

@thomasjpfan thomasjpfan removed the Superseded PR has been replace by a newer PR label May 2, 2022
@thomasjpfan
Copy link
Member

This PR is a little different from #15007. #15007 adds MAPE to the metrics module, while this one is adding it as a loss to SGDRegressor.

I would still consider this a candidate for closing, unless there is a reference or paper that demonstrates the usefulness of using MAPE for SGD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants