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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97fbc3178392abf9ed24dd100d95ce04381c689f6d2f131f0a86f4dafd4787e4 |
|
MD5 | ca18b71deb3c924c0bcc8bd94c5cd1e8 |
|
BLAKE2b-256 | 26051530b54489ca95a77d5d208d969829b78a44b22f909c61aace48f9aaad63 |
Close
Hashes for ChangePointDetectorEVT-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e159fd0a6ecaaac5ec0fa84e3f8cd6d6ea1bb9a457b25ae447e23e0def99faa8 |
|
MD5 | d41b2af976e77f72958c3d95534e593c |
|
BLAKE2b-256 | 8623049d141b88239acdd9d483170a9a794953bd603204775157d5b18bc62118 |