# [SciPy-user] Does scipy have a function to...?

Clinton Allen clintonwallen at gmail.com
Mon Sep 25 17:57:44 CDT 2006

```You might look at Chebyshev polynomials. They have a "min-max of the error"
property. One place to start is
http://mathworld.wolfram.com/ChebyshevApproximationFormula.html
Don't know if there's any python code for using these.
--Clinton

On 9/25/06, Robert Kern <robert.kern at gmail.com> wrote:
>
> Bill Dandreta wrote:
> > What I want is a smooth curve that serves as an upper limit for a data
> > plot. I would like it to be close to the data at the local maxima.
> >
> > Does such a function exist?
>
> No, not really. It would be quite tricky to construct such a beast. At the
> one
> end would be a complete interpolating curve that goes through every point;
> however, this will almost certainly not be as "smooth" as you want it. You
> would
> need to choose the length scale at which variations in the data are
> ignored.
> E.g. you need to find some means of determining why the curve should skip
> over A
> but try to get close to B.
>
>    ________
>   /*      *\
> /    A     \
>       *      \_______
>                     *B
>
> Possibly limiting the order of an interpolating polynomial or spline will
> be
> sufficient.
>
> You might be able to formulate this as a constrained minimization problem
> using
> scipy.optimize.fmin_cobyla(). Take some curve f(x), minimize (f(x) - y)
> under
> the constraint (f(x) - y >= 0).
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma
>   that is made terrible by our own mad attempt to interpret it as though
>   an underlying truth."
>    -- Umberto Eco
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20060925/5be4124e/attachment.html
```