Skip to main content

A Python implementation of seasonal trend with Loess (STL) time series decomposition

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, exposing only a couple of primary methods: decompose() and forecast(), along with a handful of built-in forecasting functions. See the included IPython notebook for more details.

Installation

A Python 3 virtual environment is recommended.

Current installation is via cloning this repo to your local workspace and a local pip install:

(env) $ git clone git@github.com:jrmontag/STLDecompose.git
(env) $ cd STLDecompose; pip install .

More Resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stldecompose-0.0.1.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

stldecompose-0.0.1-py2.py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page