PiecewiseLogisticTrend
effects.PiecewiseLogisticTrend(self,
=25,
changepoint_interval=0.8,
changepoint_range=0.001,
changepoint_prior_scale=10,
offset_prior_scale=None,
capacity_prior=True,
squeeze_if_single_series=True,
remove_seasonality_before_suggesting_initial_vals=None,
global_rate_prior_loc=None,
offset_prior_loc )
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 |