API reference¶
Generated from the source, so it cannot drift from what the package actually exports.
Estimating a trend¶
The functional surface. Each builds a smoother, fits it, and returns a DataFrame carrying the columns described in Uncertainty.
Estimate the trend by central finite differences. |
|
Estimate the trend with a Savitzky-Golay filter. |
|
Estimate the trend with a knot-selecting smoothing spline. |
|
Estimate the trend with a penalized smoothing spline. |
|
Estimate the trend with LOESS. |
|
Estimate the trend by local polynomial regression. |
|
Estimate a piecewise-polynomial trend with sparse changes in slope. |
|
Estimate the trend with Gaussian process regression. |
|
Estimate the trend with a local linear trend state-space model. |
|
Estimate a trend, choosing the method automatically if asked. |
|
Recommend a smoother for a series. |
|
Run a smoother over a DataFrame and return the structured estimate. |
Smoothers¶
The objects behind those functions. Use these directly when you want to hand
one to SiZer, to trend_with_deseasonalization, or to estimate.
Whether a smoother is linear decides how its uncertainty is computed: linear smoothers get an exact operator variance, the rest are bootstrapped.
Base class for every trend estimator. |
|
Savitzky-Golay filter: local polynomial least squares on a fixed window. |
|
Central finite differences on the raw series. |
|
Local polynomial regression with kernel weights. |
|
LOESS smoothing, then a local polynomial fit to the smooth. |
|
Smoothing spline with a fixed roughness penalty. |
|
Smoothing spline that chooses its own knots. |
|
L1 trend filtering: piecewise-polynomial fit with sparse kinks. |
|
Gaussian process regression with an exact derivative posterior. |
|
Local linear trend, optionally with seasonal and damping. |
|
Construct a smoother by name. |
incline.SMOOTHERS is the registry those names are looked up in: a mapping from
name to class. build(name, **kwargs) constructs from it, and
estimate_trend(method=...) dispatches through it, so a newly registered
smoother is reachable everywhere without editing a dispatch table.
Noise models¶
What noise= accepts. The default assumes independence; under real
autocorrelation that understates the uncertainty substantially.
Base class for noise specifications. |
|
Independent noise with constant variance. |
|
First-order autoregressive noise. |
|
Independent noise whose scale changes across the series. |
|
A caller-supplied noise covariance, used exactly as provided. |
|
Estimate a noise level that varies across the series. |
Results¶
A smoothed series and the derivative of that smooth, with uncertainty. |
|
Numeric time positions for a series. |
Multi-scale analysis¶
Which features survive being looked at from every smoothing scale.
A scale sweep over any smoother. |
|
The result of a scale sweep. |
|
Run a scale sweep in one call. |
|
Estimate a trend and mark where it survives a scale sweep. |
Seasonality¶
Decomposition is preprocessing: deseasonalize returns a frame, which any
estimator then accepts.
Split a series into trend, cycle and remainder. |
|
Look for a repeating cycle, by three methods in decreasing reliability. |
|
Seasonal-trend decomposition by LOESS. |
|
Classical decomposition by a centered moving average. |
|
Deseasonalize, then estimate the trend of what is left. |
|
What was found when looking for a cycle. |
Ranking many series¶
Rank series by recent trend strength. |
Simulation¶
Synthetic series with known derivatives, used by the package’s own calibration tests and available for yours.
Simulate a series from a known trend. |
|
A spread of trends covering the shapes estimators handle differently. |