Skip to main content

This is a relatively naive Python implementation of a seasonal and trend decomposition using Loess smoothing. Commonly referred to as an “STL decomposition”, Cleveland’s 1990 paper is the canonical reference.

This implementation is a variation of (and takes inspiration from) the 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

Metadata

Release files for stldecompose 0.0.5

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

Source distribution (sdist)

Source distribution for stldecompose 0.0.5
File Size Uploaded Provenance
stldecompose-0.0.5.tar.gz 7.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 13.9 kB

Release files / stldecompose-0.0.5.tar.gz

Download URL stldecompose-0.0.5.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dc13f103a1abb6fba53937dbf6607c2c7e5bc483317ab7879ea5fb3e968d97ac
BLAKE2b-256 checksum
How to use checksums
367804d96ebbacf2c8d0876167c900e248f10440a84cd2e59490044a2944b84e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

Release files / stldecompose-0.0.5-py2.py3-none-any.whl

Download URL stldecompose-0.0.5-py2.py3-none-any.whl
Size 6.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
13b12c97ccd23438e5ca71af646ac2650b04c83a02f1ad2127b0d4f50b9ac5f1
BLAKE2b-256 checksum
How to use checksums
7f0fcc3cf33ae4ec1ffc83a2951dc37b5cdb49f9166c0e1de1a61e11b6d954fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

Security for stldecompose 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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