Skip to content

Is there an introduction about the parameters that I can use? #2681

@PetrichorSjj

Description

@PetrichorSjj

I read the paper "Forecasting at scale", and I realized that the current parameters of the Prophet model are abstracted to make it easier for analysts without a statistical background to use. I would like to know:

  • When I adjust each parameter, what specific changes occur in the internal trend and seasonality models, and how do the parameters in the formulas change accordingly? This will help me better understand these parameters for tuning in practical applications.

  • Is there a way to directly adjust the parameters in the specific formulas?

  • In practical applications, we have added external variables as follows. I would like to know how the model handles and utilizes these external variables when they are added, and how these external variables will impact the final prediction results.

# Add external variables: UV and the cumulative value of crash rate over the last 3 days
data = data.reset_index()
data['Last3DaysCumulative'] = data[target_col].rolling(window=3, min_periods=1).sum().reset_index(level=0, drop=True)
data.set_index(index_col, inplace=True)  # Reset the index again

# Fill NaN values
data['Last3DaysCumulative'] = data['Last3DaysCumulative'].fillna(method='ffill')
exog_vars = [uv_col, 'Last3DaysCumulative']

model = Prophet(
    seasonality_mode=param_grid['seasonality_mode'],
    seasonality_prior_scale=param_grid['seasonality_prior_scale'],
    changepoint_prior_scale=param_grid['changepoint_prior_scale'],
    interval_width=param_grid['interval_width']
)
for var in exog_vars:
    model.add_regressor(var)
model.add_seasonality(name='weekly', period=7, fourier_order=param_grid['fourier_order'])
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions