Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jrmontag/stldecompose
A Python implementation of Seasonal and Trend decomposition using Loess (STL) for time series data.
https://github.com/jrmontag/stldecompose
modeling python python2 python3 statistics time-series
Last synced: 1 day ago
JSON representation
A Python implementation of Seasonal and Trend decomposition using Loess (STL) for time series data.
- Host: GitHub
- URL: https://github.com/jrmontag/stldecompose
- Owner: jrmontag
- License: mit
- Created: 2017-10-16T20:27:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-03T04:39:56.000Z (almost 6 years ago)
- Last Synced: 2025-01-19T13:10:54.645Z (3 days ago)
- Topics: modeling, python, python2, python3, statistics, time-series
- Language: Jupyter Notebook
- Homepage:
- Size: 295 KB
- Stars: 183
- Watchers: 10
- Forks: 49
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
STL Decompose
=============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 [email protected]:jrmontag/STLDecompose.git
(env) $ cd STLDecompose; pip install .More Resources
--------------- ``statsmodels`` `Time Series analysis `_ package
- Hyndman's `OTexts reference on STL decomposition `_
- Cleveland et al. 1990 [`pdf `_]