Closed Shmuley95 closed 1 year ago
The documentation looks correct to me. We're trying to estimate the cumulative distribution function.
Ah yes, I got a bit confused by the grid over which is interpolated (the x-axis) being named "y" and being described in the comment as "data". My bad!
https://juliamath.github.io/Interpolations.jl/latest/control/#Monotonic-interpolation
Maybe I don't understand the documentation, but in the example on monotonic interpolation, in the third line the data and the grid seem to be reversed. That is:
itp_cdf = extrapolate(interpolate(y, percentile_values, SteffenMonotonicInterpolation()), Flat());
should probably beitp_cdf = extrapolate(interpolate(percentile_values, y, SteffenMonotonicInterpolation()), Flat());