-
Notifications
You must be signed in to change notification settings - Fork 2
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
weighted KDE returns nan #56
Comments
Still investigating, where exactly the issue comes from... @jokr91 Do you have a hunch why normalized weights might lead to an issue and non-normalized weights seem to not cause the issue? |
I think the weights are just always normalized, right? Line 105 in 732e19d
anyways, I am not sure, whether the histogram itself is still normalized if weights are given...? |
Side note, when debugging this, mind that currently, we do not check for negative weights (#58 ) |
I suggest to pull #60 first as soon as it is accepted. |
Due to the way std::accumulate decides which version is used (the initial value is the deciding factor), the sum was performed on integers, this leads to 0 values, when the parts of the sum are smaller 1. This should address and close #56 , and close #57. Tests against this behavior should be added. Do not merge until I added these tests!
Due to the way std::accumulate decides which version is used (the initial value is the deciding factor), the sum was performed on integers, this leads to 0 values, when the parts of the sum are smaller 1. This should address and close #56 , and close #57. Tests against this behavior should be added. Do not merge until I added these tests!
The example0-notebook is actually broken:
I don't know since when, but if weights are given, the kde returns an array full of nan as kde.pdf
To be clear: I believe that this is a problem in the code not in the example.
Not sure exactly what the actual problem is. I will investigate in the next few days (no time today)
The text was updated successfully, but these errors were encountered: