[SciPy-user] piecewise linear approximation

John Hunter jdh2358 at gmail.com
Tue Feb 5 16:06:25 EST 2008


I would like to do a piecewise linear approximation to a time series
using the constraint that I can use at most N piecewise linear
segments where the error between the piecewise approximation and the
original time series in minimized.  N is an input to the algorithm.  I
suspect this problem is solved somewhere (using scipy!), so am
wondering if someone can point me to the light.

I've attached an example data set that is representative of the kind
of time series I want to approximate.  For output, I primarily need
the indices of the segment end points

Thanks,
JDH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spy.dat
Type: video/mpeg
Size: 13125 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080205/571d5d1e/attachment.m1v>


More information about the SciPy-User mailing list