[SciPy-User] inverse function of a spline

josef.pktd at gmail.com josef.pktd at gmail.com
Sat Oct 1 12:05:08 EDT 2011


On Sat, Oct 1, 2011 at 11:17 AM, Charles R Harris <charlesr.harris at gmail.com
> wrote:

>
>
> On Sat, Oct 1, 2011 at 8:52 AM, <josef.pktd at gmail.com> wrote:
>
>>
>>
>> On Fri, Sep 30, 2011 at 12:37 PM, <josef.pktd at gmail.com> wrote:
>>
>>> On Thu, Sep 29, 2011 at 12:37 PM, Jeff Brown <brownj at seattleu.edu>
>>> wrote:
>>> >  <josef.pktd <at> gmail.com> writes:
>>> >
>>> >>
>>> >> On Fri, May 7, 2010 at 4:37 PM, nicky van foreest <vanforeest <at>
>>> gmail.com>
>>> > wrote:
>>> >> > Hi Josef,
>>> >> >
>>> >> >> If I have a cubic spline, or any other smooth interpolator in
>>> scipy,
>>> >> >> is there a way to get the
>>> >> >> inverse function directly?
>>> >> >
>>> >> > How can you ensure that the cubic spline approx is non-decreasing? I
>>> >> > actually wonder whether using cubic splines is the best way to
>>> >> > approximate distribution functions.
>>> >>
>>> >> Now I know it's not, but I was designing the extension to the linear
>>> case
>>> >> on paper instead of in the interpreter, and got stuck on the wrong
>>> >> problem.
>>> >>
>>> >
>>> > There's an algorithm for making constrained-to-be-monotonic spline
>>> interpolants
>>> > (only in one dimension, though).  The reference is Dougherty et al 1989
>>> > Mathematics of Computation, vol 52 no 186 pp 471-494 (April 1989).
>>>  This is
>>> > available on-line at www.jstor.org.
>>>
>>> Thanks for the reference. Maybe Ann's interpolators in scipy that take
>>> derivatives could be used for this.
>>>
>>
>> trying out how PiecewisePolynomial works, almost but not quite enough
>>
>>
> IIRC, de Boor dealt with fitting distribution functions somewhere in his
> book "A Practical Guide to Splines". I don't recall whether or not he
> constrains things to positivity, but recalling one of the figures, I think
> that he was fitting histograms, perhaps their area.
>

looks nice, he matches the area in each bin. page 79 ff, I don't see any
explicit non-negativity constraints.

as for an efficient implementation in numpython: ?

Josef


>
> <snip>
>
> Chuck
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20111001/47156bdb/attachment.html>


More information about the SciPy-User mailing list