
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
A Python port of R's stl function. Translated rather literally from the original R/Fortran source and vectorized with NumPy.
For more information see the R manual.
Compatible with Python 2 and 3.
pip install --user rstl
Import the STL class and call its constructor.
import numpy as np
from rstl import STL
ts = np.arange(144)
freq = 12
stl = STL(ts, freq, "periodic")
trend = stl.trend
The code itself is mostly uncommented due to it being a literal translation.
class STL(ts, freq, s_window, s_degree=0, t_window=None,
t_degree=1, l_window=None, l_degree=None, s_jump=None,
t_jump=None, l_jump=None, robust=False, inner=None, outer=None):
Note that a value of None means that the default R value will be used. (These could not be specified in the signature because Python does not allow referencing other parameters).
Args:
Optional args:
Attributes:
trend: The trend component of the time series (numpy array).
seasonal: The seasonal component of the time series (numpy array).
remainder: The remainder of the time series not explained by trend and seasonal components (numpy array).
weights: The final robust weights (all one if fitting is not done robustly) (numpy array).
s_window, s_degree, t_window, t_degree, l_window, l_degree, s_jump, t_jump, l_jump, inner and outer. Note that these may have been altered by the program.
According to tests a runtime increase of factor ~3-5 should be expected.
Python port Copyright 2018 Eric Rauch.
Original source Copyright 2014 B.D. Ripley; Fortran code by Cleveland et al (1990) from ‘netlib’.
Licensed under the GPLv3.
FAQs
A Python port of R's stl function
We found that rstl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.