| 26 | NANOSECONDS_TO_SECONDS = 1000 * 1000 * 1000 |
| 27 | |
| 28 | class Prophet(object): |
| 29 | stan_backend: IStanBackend |
| 30 | |
| 31 | """Prophet forecaster. |
| 32 | |
| 33 | Parameters |
| 34 | ---------- |
| 35 | growth: String 'linear', 'logistic' or 'flat' to specify a linear, logistic or |
| 36 | flat trend. |
| 37 | changepoints: List of dates at which to include potential changepoints. If |
| 38 | not specified, potential changepoints are selected automatically. |
| 39 | n_changepoints: Number of potential changepoints to include. Not used |
| 40 | if input `changepoints` is supplied. If `changepoints` is not supplied, |
| 41 | then n_changepoints potential changepoints are selected uniformly from |
| 42 | the first `changepoint_range` proportion of the history. |
| 43 | changepoint_range: Proportion of history in which trend changepoints will |
| 44 | be estimated. Defaults to 0.8 for the first 80%. Not used if |
| 45 | `changepoints` is specified. |
| 46 | yearly_seasonality: Fit yearly seasonality. |
| 47 | Can be 'auto', True, False, or a number of Fourier terms to generate. |
| 48 | weekly_seasonality: Fit weekly seasonality. |
| 49 | Can be 'auto', True, False, or a number of Fourier terms to generate. |
| 50 | daily_seasonality: Fit daily seasonality. |
| 51 | Can be 'auto', True, False, or a number of Fourier terms to generate. |
| 52 | holidays: pd.DataFrame with columns holiday (string) and ds (date type) |
| 53 | and optionally columns lower_window and upper_window which specify a |
| 54 | range of days around the date to be included as holidays. |
| 55 | lower_window=-2 will include 2 days prior to the date as holidays. Also |
| 56 | optionally can have a column prior_scale specifying the prior scale for |
| 57 | that holiday. |
| 58 | seasonality_mode: 'additive' (default) or 'multiplicative'. |
| 59 | seasonality_prior_scale: Parameter modulating the strength of the |
| 60 | seasonality model. Larger values allow the model to fit larger seasonal |
| 61 | fluctuations, smaller values dampen the seasonality. Can be specified |
| 62 | for individual seasonalities using add_seasonality. |
| 63 | holidays_prior_scale: Parameter modulating the strength of the holiday |
| 64 | components model, unless overridden in the holidays input. |
| 65 | changepoint_prior_scale: Parameter modulating the flexibility of the |
| 66 | automatic changepoint selection. Large values will allow many |
| 67 | changepoints, small values will allow few changepoints. |
| 68 | mcmc_samples: Integer, if greater than 0, will do full Bayesian inference |
| 69 | with the specified number of MCMC samples. If 0, will do MAP |
| 70 | estimation. |
| 71 | interval_width: Float, width of the uncertainty intervals provided |
| 72 | for the forecast. If mcmc_samples=0, this will be only the uncertainty |
| 73 | in the trend using the MAP estimate of the extrapolated generative |
| 74 | model. If mcmc.samples>0, this will be integrated over all model |
| 75 | parameters, which will include uncertainty in seasonality. |
| 76 | uncertainty_samples: Number of simulated draws used to estimate |
| 77 | uncertainty intervals. Settings this value to 0 or False will disable |
| 78 | uncertainty estimation and speed up the calculation. |
| 79 | stan_backend: str as defined in StanBackendEnum default: None - will try to |
| 80 | iterate over all available backends and find the working one. |
| 81 | scaling: 'absmax' (default) or 'minmax'. |
| 82 | holidays_mode: 'additive' or 'multiplicative'. Defaults to seasonality_mode. |
| 83 | """ |
| 84 | |
| 85 | def __init__( |
no outgoing calls
searching dependent graphs…