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.: 3. Session=ChangePointDetector.ChangePointDetector(data,dates)
- 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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e244cb5a10b822d4f37b745f312d416b390d36c7447c0f10e16e0b66673dd57 |
|
MD5 | d25b2d38805b190cf527ed7361f9a2c5 |
|
BLAKE2b-256 | e1ea06fc14d93c65a9608fa83b0968a3b23f8fe8375c34be01a5834ebd46807f |
Close
Hashes for ChangePointDetectorEVT-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25947c8a9fc81173e44d180f006952989e64cc9dda7dba0c4651c3865d9b2d05 |
|
MD5 | 5cb0edf313043ce52dc5a1f45b2cdd7b |
|
BLAKE2b-256 | 3cf1f627002adb856b3bee555abc765dfaa249481f19df23c1a3becb4c1ba51d |