This module takes a time series and returns: (a) the underlaying linear trend and (b) the times where there is a change in the trend
Project description
ChangePointDetector
This module returns change points in a time series, using Kalman filters and EVT as described in https://www.robots.ox.ac.uk/~sjrob/Pubs/LeeRoberts_EVT.pdf
- Prepare your time series as data plus Panda dates
- Create the necessary Kalman representation by creating a "session" object by calling the ChangePoint class, e.g.: Session=ChangePointDetector.ChangePointDetectorSession(data,dates). 'SeasonalityPeriods' is an optional input, e.g 12 = calendar month seasonality
- Determine the changepoints by running the ChangePointDetectorFunction on your "session", e.g. Results=Session.ChangePointDetectorFunction()
This will return a "Results" object that contains the following:
- ChangePoints. This is a list of 0s and 1s the length of the data, where 1s represent changepoints
- Prediction. This is the Kalman smoothed actuals, plus a 3 period forecast. Note no forecast will be made if there is a changepoint in the last 3 dates
- PredictionVariance. Variance of the smoothed actuals and forecast
- ExtendedDates. These are the original dates plus 3 exta for the forecast (if a forecast has been made)
- Trend. This is the linear change factor
- TrendVariance. Variance of the trend
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ChangePointDetectorEVT-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dce1ca0d5e601d2bfd00b3a98475610fde72fbe00e4969bc460d5b2bfa61d40 |
|
MD5 | 040e892a312087fe4ce1236463aaf187 |
|
BLAKE2b-256 | 738b8efce2725d8cf58af1f1e797bc5344066a0edb651c4d372f4860f9af7683 |
Close
Hashes for ChangePointDetectorEVT-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e153416e66e5c8c4fa26fe4e599a536369db72f767b80e11ef175be198e4e5c0 |
|
MD5 | 25cb87ee22baffb14a470c9c9670be82 |
|
BLAKE2b-256 | 15bc71777c285efb95cb7e2c885bf2ccc9249b319deafcf797e68657aed88d7f |