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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e498a7c245c06e2814701cf97a064bb271aaa250caab55b2f88af136c19bb8 |
|
MD5 | 55bf8b2d8c237917b4eb7eeeb84d23a6 |
|
BLAKE2b-256 | bfc2c3b9546f3eb47d8a1a7c85739d5d4fa522055a2792807aad13e41a1cd02b |
Close
Hashes for ChangePointDetectorEVT-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93a4f7a71072d1ecbb94b9b9a2aaa80e55f1e222339188c915b04e9ee7a7eb60 |
|
MD5 | d0a2b7e4c0afb2a97624aedc34781e2b |
|
BLAKE2b-256 | 21e4def68fde873e889e68dce91f0fc60892a9d73d35bbf55cbf80351d99d855 |