incline.SavitzkyGolay¶
- class incline.SavitzkyGolay(window_length=15, polyorder=3)[source]¶
Savitzky-Golay filter: local polynomial least squares on a fixed window.
A fixed convolution, so the derivative operator is available in closed form as well as by probing – the two agree to 1e-15, which makes this the natural cross-check on the probe machinery.
- Variables:
- Parameters:
- __init__(window_length=15, polyorder=3)¶
Methods
__init__([window_length, polyorder])analytic_operators(axis, order)State the smoothing and derivative operators directly, if known.
closed_form_se(axis, order, sigma)Interior standard error from the filter coefficients directly.
evaluate(axis, y, order)Filter the series and differentiate.
fit(axis, y[, order, se, noise, ...])Estimate the trend and, optionally, its uncertainty.
native_posterior(axis, y, order, ...)Uncertainty from the smoother's own probability model.
operators(axis, order)The smoothing and derivative operators for this configuration.
params()Report the window and polynomial order.
scale_of(axis)Window length as a fraction of the sample.
with_scale(scale, axis)Set the window to
scaleof the sample.Attributes
has_native_posterioris_linearWhether the derivative is a fixed linear map of the data.
- closed_form_se(axis, order, sigma)[source]¶
Interior standard error from the filter coefficients directly.