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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b41efb701f21c8fc925341c5fb8eb73a43f8e23cbb6421a92b0f840e46469fbc |
|
MD5 | f267e98356b152599fa20d458bb4da2f |
|
BLAKE2b-256 | f95a2eed070199ae4345bfccf5635e0314afc2e155fe06728582e4c93615cea8 |
Close
Hashes for ChangePointDetectorEVT-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eebd6221d0bb269d7853455792e288eccc4d82a170dac17f902fe968e168fa4 |
|
MD5 | dc8740874f036e3131f79162865f63f3 |
|
BLAKE2b-256 | 1383c4a4c58aee6e2729fa303bec4c66aa281eda9917cab6fb5ad1ff5148f015 |