[SciPy-User] B-spline basis functions?
Tue Jul 31 10:37:26 CDT 2012
I'd like to be able to do spline regression in patsy, which means
that I need to be able to compute b-spline basis functions. I am not
an initiate into the mysteries of practical spline computations, but I
*think* the stuff in scipy.signal is not quite usable as is, because
it's focused on doing interpolation directly rather than exposing the
basis functions themselves?
Specifically, to achieve feature parity with R , I need to be able to take
- an arbitrary order
- an arbitrary collection of knot positions (which may be irregularly spaced)
- a vector x of points at which to evaluate the basis functions
and spit out the value of each spline basis function evaluated at each
point in the x vector.
It looks like scipy.signal.bspline *might* be useful, but I can't
quite tell? Or alternatively someone might have some code lying around
to do this already?
Basically I have a copy of Schumaker here and I'm hoping someone will
save me from having to read it :-).
More information about the SciPy-User