[Scipy-tickets] [SciPy] #1226: splrep considered inadequate for least squares, needs replacement.

SciPy Trac scipy-tickets@scipy....
Fri Jul 9 19:18:59 CDT 2010

#1226: splrep considered inadequate for least squares, needs replacement.
 Reporter:  charris      |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  normal       |   Milestone:  0.9.0   
Component:  Other        |     Version:  0.7.0   
 Keywords:               |  
 splrep has unnecessary restricts on the data and weights, to wit:

 1) w must be strictly positive -- irrelevant[[BR]]

 2) x must be strictly increasing -- irrelevant, and even unlikely for
 large combined data sets produced by digital instruments limited by
 digital truncation error.[[BR]]

 Furthermore, the underlying subroutine, fpcurfit.f, uses Givens rotations
 to reduce the design matrix to upper triangular form a row at a time,
 consequently there is no column pivoting and it is unable to deal with
 singular, or near singular, cases and offers no control over the required
 matrix condition. Also, in common with numpy lstsq, the covariance matrix
 is not available.

 In addition to these considerable sins, fpcurfit.f is a mixed bag of
 tricks combining multidimensional curve fitting and smoothing via knot
 adjustments all together in the same subroutine and written in pre-77
 FORTRAN. Not nice.

 The splrep routine can probably be replaced by a python version together
 with a low level (cython?) routine for evaluating the B-splines. I doubt
 it would be much slower.

Ticket URL: <http://projects.scipy.org/scipy/ticket/1226>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list