-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix log density spline extrapolation #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some comments on what the code is doing, and how it is resolving the issue? My understanding is that you clip the vector, and then "fix" the NaN's later.
I think like 191 is just fixing a different bug.
I'm not sure what 195 is doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @marco-2023 and/or @gabrielasd ?
7d1cf52
to
6b8966e
Compare
np.log(y) if log else y, | ||
# Clip y values to >=ε^2 if using log because they have to be above 0; | ||
# having them be at least ε^2 seems to work based on my testing | ||
np.log(y.clip(min=np.finfo(float).eps ** 2)) if log else y, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PaulWAyers and @msricher I have a doubt, for all the features that we describe as splines, for values of r
outside our array of values, the spline is a polynomial that will diverge for
f15d93e
to
a2653e6
Compare
No description provided.