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
- 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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f5818031b404b688bafb516b758f9888831506b9b087814597850d8fdc0fd1 |
|
MD5 | 01ce15d7b90c343b367ae819d85ea5b6 |
|
BLAKE2b-256 | 030dd6b09071b49510b97ee92e76450dbb0031e54265d443846addaf0b2e0e91 |
Close
Hashes for ChangePointDetectorEVT-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eddfdce5e59079dcea218ae10f849ff55ba0f7eb0b3add6bbdca7c4406c4613 |
|
MD5 | c436f3f5ef3ee44edc43288a420454a4 |
|
BLAKE2b-256 | b35f9b52ea510f62efe89499e5908b57cdaaae477950ef0403fc747af7862f2f |