PiecewiseLogisticTrend

effects.PiecewiseLogisticTrend(
    self,
    changepoint_interval=25,
    changepoint_range=0.8,
    changepoint_prior_scale=0.001,
    offset_prior_scale=10,
    capacity_prior=None,
    squeeze_if_single_series=True,
    remove_seasonality_before_suggesting_initial_vals=True,
    global_rate_prior_loc=None,
    offset_prior_loc=None,
)

Piecewise logistic trend model.

This logistic trend differs from the original Prophet logistic trend in that it considers a capacity prior distribution. The capacity prior distribution is used to estimate the maximum value that the time series trend can reach.

It uses internally the piecewise linear trend model, and then applies a logistic function to the output of the linear trend model.

The initial values (global rate and global offset) are suggested using the maximum and minimum values of the time series data.

Parameters

Name Type Description Default
changepoint_interval int The interval between changepoints. 25
changepoint_range int The range of the changepoints. 0.8
changepoint_prior_scale dist.Distribution The prior scale for the changepoints. 0.001
offset_prior_scale float The prior scale for the offset. Default is 0.1. 10
squeeze_if_single_series bool If True, squeeze the output if there is only one series. Default is True. True
remove_seasonality_before_suggesting_initial_vals bool If True, remove seasonality before suggesting initial values, using sktime’s detrender. Default is True. True
capacity_prior dist.Distribution The prior distribution for the capacity. Default is a HalfNormal distribution with loc=1.05 and scale=1. None