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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b0eb81f93ad1a26793e918d7b3cc8c84ee7530eeeb494c5cc3aa8c4e582600 |
|
MD5 | 70d201c5b05129c350cf7f4b8d9766ae |
|
BLAKE2b-256 | 4adc9900ca00088660e84d5d161a754211d19e7a2608fb702b59ce3216763737 |
Close
Hashes for ChangePointDetectorEVT-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 027fefae9684777a72180aa70af131859b059f0a66938306d4ea8a73b9405d1d |
|
MD5 | b317eb2dcc9a70122e99d8e54b3f5ba7 |
|
BLAKE2b-256 | 14b0b650f28a5ffc1f3eeace2c9d22299d606fc7aa0e51a6ec3e76159fd9f08d |