-
Notifications
You must be signed in to change notification settings - Fork 50
Switch SplineBouleImpurityDensity to FritschCarlsonMonotonicInterpolation
#547
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
Conversation
fhagemann
left a comment
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.
For reference, this is what the examples in the previous PR #545 look like now:
z = [1,5,6,10]
ρ = [1,2,3,4]
scatter(z, ρ)
plot!(range(extrema(z)..., length = 100),z -> spline(z))
z = [1,5,6.5,10]
ρ = [1,2,3,4]
ρ = [1,2,3,2]
scatter(z, ρ)
plot!(range(extrema(z)..., length = 100),z -> spline(z))
z = [1,5,7.6,10]
ρ = [1,2,3,2]
scatter(z, ρ)
plot!(range(extrema(z)..., length = 100),z -> spline(z))
|
Also, seems like we can decrease the bound for |
|
The only thing that does not (yet) work with this PR: z = [1,5,6,10]
ρ = [1,2,3,4]
plot!(0:1e-3:11, z -> spline(z))Should we add some catch for this (e.g. if |
With the cubic spline it was the same story. But I would put the check in |
fhagemann
left a comment
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.
Perfect, thanks!
|
Tests pass locally, I am going to merge this now. |
…olation` (#547) * switch to FritschCarlsonMonotonicInterpolation * check that point is in boule * assert for SplineBouleImpurityDensity * Lower compat for Interpolations back to 0.14 * Update boule impurity tests --------- Co-authored-by: Felix Hagemann <[email protected]> (cherry picked from commit 7336b54)
Continuing the discussion on #545 @fhagemann suggested to switch to FritschCarlsonMonotonicInterpolation.
This provides an elegant solution which is built into
Interpolations.