-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Decaying() Returns Unexpected Values #3447
Comments
Thanks for this! I was sure I replied to that comment on Twitter, but I don't see it there. I guess I must not have. Maybe I lost connection after typing the tweet. Sorry! Anyway, I would've encouraged you to open an issue, and noted that this type of thing is one of my weaker points. |
@honnibal Here it is btw – Twitter just makes it difficult to find nested replies: https://twitter.com/honnibal/status/1100848503759216640 |
I have pushed up a branch and made a PR - slk/issue#3447- you can see the change I've made to I think this does address the core problem with how the method was originally defined but doesn't address the error I mentioned above about floating point inaccuracy. Here are the outputs for my version of
|
Merged, thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
How to reproduce the behavior
Add the following code to any project which includes spaCy
This is a direct test of the example provided in the spaCy docs for util.decaying. It will fail on the first assertion.
Additionally the example shows an impossible sequence as this is a decaying series and 1 > 10. If you invert the start and end values you do get a sequence which never decays below the end.
Looking at the actual series you can see that it does not decay at a rate of 0.001 but some approximately close number lost to floating point math which eventually results in the ability to get nearly duplicate values in the series:
There is also a problem with how the decay factor is considered. If you use a larger factor the results are completely non-sensical:
I expressed this issue on twitter in this thread. This issue is mainly being opened so I can make the PR per the contribution guidelines.
Your Environment
The text was updated successfully, but these errors were encountered: