Skip to main content

STL Decompose

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

Release files for stldecomposemod 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stldecomposemod 0.0.3
File Size Uploaded
stldecomposemod-0.0.3.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stldecomposemod 0.0.3
File Interpreter ABI Platform
stldecomposemod-0.0.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 26.0 kB

Release files / stldecomposemod-0.0.3.tar.gz

Download URL stldecomposemod-0.0.3.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4020e4ea62839e1efbccc05b199b4c78acef2bfee7a166b49fcc4a383298da08
BLAKE2b-256 checksum
How to use checksums
b2814ff060920661738c08d3457b21a6c043a2b68a15a64f7def528be3809aea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / stldecomposemod-0.0.3-py2.py3-none-any.whl

Download URL stldecomposemod-0.0.3-py2.py3-none-any.whl
Size 19.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2ff81fe0c1a3374bbc05de8dac2003ea6ea088ad2a835fcae1f79316dd9d769c
BLAKE2b-256 checksum
How to use checksums
fd21966bc9ff13c7e4648d8254adee7840457c1032f66cf7daf04c2ad751665f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page