Method summary
- __call__(self, x, nu = None)
- __init__(self, x, y, w = None, bbox = ([ None ] * 2), k = 3, s = None)
- derivatives(self, x)
- get_coeffs(self)
- get_knots(self)
- get_residual(self)
- integral(self, a, b)
- roots(self)
- set_smoothing_factor(self, s)
Methods
- __call__(self, x, nu = None)
Evaluate spline (or its nu-th derivative) at positions x. Note: x can be unordered but the evaluation is more efficient if x is (partially) ordered.
- __init__(self, x, y, w = None, bbox = ([ None ] * 2), k = 3, s = None)
Input: x,y - 1-d sequences of data points (x must be in strictly ascending order) Optional input: w - positive 1-d sequence of weights bbox - 2-sequence specifying the boundary of the approximation interval. By default, bbox=[x[0],x[-1]] k=3 - degree of the univariate spline. s - positive smoothing factor defined for estimation condition: sum((w[i]*(y[i]-s(x[i])))**2,axis=0) <= s Default s=len(w) which should be a good value if 1/w[i] is an estimate of the standard deviation of y[i]. - derivatives(self, x)
Return all derivatives of the spline at the point x.
- get_coeffs(self)
Return spline coefficients.
- get_knots(self)
Return the positions of (boundary and interior) knots of the spline.
- get_residual(self)
Return weighted sum of squared residuals of the spline approximation: sum ((w[i]*(y[i]-s(x[i])))**2,axis=0)
- integral(self, a, b)
Return definite integral of the spline between two given points.
- roots(self)
Return the zeros of the spline.
Restriction: only cubic splines are supported by fitpack.
- set_smoothing_factor(self, s)
Continue spline computation with the given smoothing factor s and with the knots found at the last call.
