This module takes a date 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 date 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 if your data is sequential months, 12 = calendar month seasonality
- 'ForecastPeriods' is another optional input, indicating how many periods to forecast. Default = 3
- 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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 940971fcc816e0ae8efdc6a667d213d272b96f62367ae8cb114aa8d7b778613b |
|
MD5 | b42d4d1943a0c45ca82cd4823b6a5e21 |
|
BLAKE2b-256 | 96716953c2c1e392b0b74cbe6008dcb6eae48324beabd8b0ceb62f745d103a80 |
Close
Hashes for ChangePointDetectorEVT-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47d333c1d4f51a64daee037b8c19118b31e1767e31292825f377825dd6963684 |
|
MD5 | 934440d9eab888e734fb9222e196bc85 |
|
BLAKE2b-256 | d7cb9aa936bdde54f0e8cb74bdcce5b11bc244872afa445fe3f46c983dad4db1 |