[Scipy-tickets] [SciPy] #379: Default value of s is not as described in the documentation to splrep

SciPy scipy-tickets@scipy....
Fri Feb 23 17:39:01 CST 2007

#379: Default value of s is not as described in the documentation to splrep
 Reporter:  peridot  |       Owner:  somebody
     Type:  defect   |      Status:  new     
 Priority:  normal   |   Milestone:          
Component:  Other    |     Version:          
 Severity:  normal   |    Keywords:          
 splrep requires a smoothing parameter, s, to operate. A default value of
 s, 0.001, was supplied as a response to ticket 199 but not described in
 the docstring. I suggest changing the default value of s (and changing the
 docstring to match, if necessary).

 The value None chooses s=m-sqrt(2*m), as described in the docstring. The
 effect of this setting (None) is to choose a smoothing spline instead of
 an interpolating spline.

 The value s=0. constructs an interpolating spline, forcing it to pass
 through all the points.

 The value s=0.001 produces a spline which (if no weights are provided)
 tries to pass within about 0.001 of each point. This is a strange choice
 for a default...

 I recommend setting s=None to the default, and further modifying it so
 s=None produces s=0. if no weights are provided (giving an interpolating
 spline) and s=m-sqrt(2*m) if weights are provided (since the user
 presumably then wanted a smoothing spline).

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

More information about the Scipy-tickets mailing list