0
votes

I have a cumulative function (CDF) made of 6 points. I have to interpolate it so I used interp1d (from scipy.interpolate import interp1d), the results is the following:

enter image description here

the blue dots are the initial data and the red curve is after linear intepolation. However, I am not really happy about it especially between the point 4 and 5 the assumption of linear relation is underestimating the real curve (if I think of this curve as a sigmoid or hyperbolic tangent). Therefore I tried to use always interp1d but with quadratic and cubic and the result is catastroficenter image description here

the output makes no sense and it completely wrong, so my question is

how to make my original linear fit a bit more smooth and similar to a real cumulative function? Thanks, Luigi

1
Hi thanks for the answer, yes I did that approach and the result is not bad. However, since my curve is a CDF i would like to fit a lognormal CDF rather than a monotonic cubic..can you help with it? thanks! - Luigi87

1 Answers

0
votes

Try monotone interpolants, akima/pchip