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.: 3. Session=ChangePointDetector.ChangePointDetector(data,dates)
- 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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 967f28cc857e065149ed3a8d707ab7ecd22451d4de31cc4d21d26e3ad77c04b0 |
|
MD5 | cdd4ace8126f6fa74cb5d3950c8094c5 |
|
BLAKE2b-256 | b36c15e0bf9794f814193acf0f9e0ecee7be78e70f03ca8a30f80f818916b3d2 |
Close
Hashes for ChangePointDetectorEVT-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 749a65bb5824e8665a0a01b35cff5fed7e1a6e82d54825b2964cb8159d5f877f |
|
MD5 | a2bfc75f675d860f90017c7fffd5360b |
|
BLAKE2b-256 | 165e7dca354cf2667c251e2ea075ac0fb853eaced1a383e448e6ba37b82131ea |