tsseg.algorithms.prophet package
Prophet — trend change point detection via Facebook Prophet.
Description
This detector wraps Facebook Prophet’s piecewise-linear trend model. Prophet specifies a large number of potential change points uniformly placed in the first 80 % of the time series, then applies an L1-regularised (sparse) prior on the rate-change magnitudes so that most potential points go unused. The detector extracts the locations of the significant rate changes from the fitted model.
Key parameters:
n_changepoints— number of potential change points.changepoint_prior_scale(tunable insidecost_params) — controls trend flexibility (default 0.05; increase for a more flexible trend).changepoint_range(tunable insidecost_params) — fraction of the history where change points are allowed (default 0.8).
n_changepoints recommended)prophet and cmdstanpyParameters
Name |
Type |
Default |
Description |
|---|---|---|---|
|
int / None |
|
Number of potential change points. |
|
callable / None |
|
Callable that determines |
|
str |
|
Strategy for multivariate series ( |
|
float |
|
Tolerance for change-point deduplication. |
|
int |
|
Time axis. |
Usage
from tsseg.algorithms import ProphetDetector
detector = ProphetDetector(n_changepoints=10)
labels = detector.fit_predict(X)
Implementation: Wrapper around facebook/prophet. MIT.
Reference: Taylor & Letham (2018), Forecasting at Scale, The American Statistician.