A Python implementation of seasonal trend with Loess (STL) time series decomposition MODIFIED
Project description
This is a relatively naive Python implementation of the “Seasonal and Trend decomposition using Loess” time series decomposition (“STL decomposition,” Cleveland et al. 1990 [pdf]).
This implementation is a variation of (and takes inspiration from) the current implementation of the seasonal_decompose method in statsmodels. In this implementation, the trend component is calculated by substituting a configurable Loess regression for the convolutional method used in seasonal_decompose. It also extends the existing DecomposeResult from statsmodels to allow for forecasting based on the calculated decomposition.
Usage
The stldecompose package is relatively lightweight. It uses pandas.Dataframe for inputs and outputs, and exposes only a couple of primary methods - decompose() and forecast() - as well as a handful of built-in forecasting functions.
See the included IPython notebook for more details and usage examples.
Installation
A Python 3 virtual environment is recommended.
The preferred method of installation is via pip:
(env) $ pip install stldecompose
If you’d like the bleeding-edge version, you can also install from this Github repo:
(env) $ git clone git@github.com:jrmontag/STLDecompose.git (env) $ cd STLDecompose; pip install .
More Resources
statsmodels Time Series analysis package
Hyndman’s OTexts reference on STL decomposition
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for stldecomposemod-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ff81fe0c1a3374bbc05de8dac2003ea6ea088ad2a835fcae1f79316dd9d769c |
|
MD5 | 2dc7c3331f97874580a4544ce8302451 |
|
BLAKE2b-256 | fd21966bc9ff13c7e4648d8254adee7840457c1032f66cf7daf04c2ad751665f |