class_docstr: A derived class of `~greykite.algo.forecast.silverkite.SilverkiteForecast`.
  Provides an alternative interface with simplified configuration parameters.
  Produces the same trained model output and uses the same predict functions.
class_docstr_tok: ["A","derived","class","of","`","~greykite.algo.forecast.silverkite.SilverkiteForecast","`",".","Provides","an","alternative","interface","with","simplified","configuration","parameters",".","Produces","the","same","trained","model","output","and","uses","the","same","predict","functions","."]
docstr: Converts parameters of
  :func:`~greykite.algo.forecast.silverkite.forecast_simple_silverkite` into those
  of :func:`~greykite.algo.forecast.forecast_silverkite.SilverkiteForecast::forecast`.
  
  Makes it easier to set parameters to ``SilverkiteForecast::forecast`` suitable for most forecasting problems.
  Provides data-aware defaults for seasonality and interaction terms. Provides a simple
  configuration of holidays from an internal holiday database, and user-friendly configuration
  for growth and regressors.
  
  These parameters can be set from a plain-text config (e.g. no pandas dataframes).
  The parameter list is intentionally flat to facilitate hyperparameter grid search. Every
  parameter is either a parameter of ``SilverkiteForecast::forecast`` or a tuning parameter.
  
  Notes
  -----
  The basic parameters are identical to ``SilverkiteForecast::forecast``.
  The more complex parameters are specified via config parameters:
  
  * ``daily_event_df_dict`` (via ``holiday*``)
  * ``fs_components_df`` (via `*_seasonality``)
  * ``extra_pred_cols`` (via ``holiday*``, ``*seas*``, ``growth_term``,
    ``regressor_cols``, ``feature_sets_enabled``, ``extra_pred_cols``)
  
  Parameters
  ----------
  df : `pandas.DataFrame`
      A data frame which includes the timestamp column
      as well as the value column. This is the ``df`` for
      training the model, not for future prediction.
  time_col : `str`
      The column name in `df` representing time for the time series data
      The time column can be anything that can be parsed by pandas DatetimeIndex
  value_col: `str`
      The column name which has the value of interest to be forecasted
  time_properties : `dict` [`str`, `any`] or None, optional
      Time properties dictionary (likely produced by
      `~greykite.common.time_properties_forecast.get_forecast_time_properties`)
      with keys:
  
          ``"ts"`` : `UnivariateTimeSeries` or None
              ``df`` converted to a ``UnivariateTimeSeries``.
          ``"period"`` : `int`
              Period of each observation (i.e. minimum time between observations, in seconds).
          ``"simple_freq"`` : `SimpleTimeFrequencyEnum`
              ``SimpleTimeFrequencyEnum`` member corresponding to data frequency.
          ``"num_training_points"`` : `int`
              Number of observations for training.
          ``"num_training_days"`` : `int`
              Number of days for training.
          ``"start_year"`` : `int`
              Start year of the training period.
          ``"end_year"`` : `int`
              End year of the forecast period.
          ``"origin_for_time_vars"`` : `float`
              Continuous time representation of the first date in ``df``.
  
      In this function,
  
          - ``start_year`` and ``end_year`` are used to define ``daily_event_df_dict``.
          - ``simple_freq`` and ``num_training_days`` are used to define ``fs_components_df``.
          - ``simple_freq`` and ``num_training_days`` are used to set default ``feature_sets_enabled``.
          - ``origin_for_time_vars`` is used to set default ``origin_for_time_vars``.
          - the other parameters are ignored
  
      It is okay if ``num_training_points``, ``num_training_days``, ``start_year``, ``end_year``
      are computed for a superset of ``df``. This allows CV splits and backtest, which train on
      partial data, to use the same data-aware model parameters as the forecast on all training data.
  
      If None, the values are computed for ``df``. This corresponds to using the same
      modeling *approach* on the CV splits and backtest from `forecast_pipeline`, without
      requiring the same parameters. In this case, make sure ``forecast_horizon`` is at
      least as large as the test period for the split, to ensure all holidays are captured.
  freq : `str` or None, optional, default `None`
      Frequency of input data.
      Used to compute ``time_properties`` only if ``time_properties is None``.
      Frequency strings can have multiples, e.g. '5H'.
      See https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
      for a list of frequency aliases.
      If None, inferred by `pandas.infer_freq`.
      Provide this parameter if ``df`` has missing timepoints.
  forecast_horizon : `int` or None, optional, default `None`
      Number of periods to forecast into the future. Must be > 0.
      Used to compute ``time_properties`` only if ``time_properties is None``.
      If None, default is determined by input data frequency.
      Used to determine forecast end date, to pull the appropriate holiday data.
      Should be at least as large as the prediction period (if this function
      is called from ``forecast_pipeline``, the prediction period for different
      splits is set via ``cv_horizon``, ``test_horizon``, ``forecast_horizon``).
  origin_for_time_vars : `float` or None, optional, default `None`
      The time origin used to create continuous variables for time.
      If None, uses the value from ``time_properties``.
  train_test_thresh : `datetime.datetime` or None, optional, default `None`
      e.g. datetime.datetime(2019, 6, 30)
      The threshold for training and testing split.
      Note that the final returned model is trained using all data.
      If None, training split is based on ``training_fraction``.
  training_fraction : `float` or None, optional, default 0.9
      The fraction of data used for training (0.0 to 1.0)
      Used only if ``train_test_thresh is None``.
      If this is also None or 1.0, then we skip testing
      and train on the entire dataset.
  fit_algorithm : `str`, optional, default "linear"
      The type of predictive model used in fitting.
  
      See `~greykite.algo.common.ml_models.fit_model_via_design_matrix`
      for available options and their parameters.
  fit_algorithm_params : `dict` or None, optional, default None
      Parameters passed to the requested fit_algorithm.
      If None, uses the defaults in `~greykite.algo.common.ml_models.fit_model_via_design_matrix`.
  auto_holiday : `bool`, default False
      Whether to automatically infer holiday configuration based on the input timeseries.
      If True, holiday groups will be constructed through estimated holiday effects. If False,
      the other specified holiday configuration will be used to generate holiday features.
      Notice that the following parameters serve different uses in two case:
  
          * "Daily_event_df_dict": When ``auto_holiday = False``, this specifies additional events that are
            ready for use in modeling; when ``auto_holiday = True``, this provides a list of holidays that
            can be processed and used as inputs for ``HolidayGrouper``.
          * "auto_holiday_params": It contains customized parameter values that can be used for ``HolidayGrouper``.
           When ``auto_holiday = False``, this will not be used.
  
      For details, see `~greykite.algo.common.holiday_grouper.HolidayGrouper`.
  holiday_lookup_countries : `list` [`str`] or "auto" or None, optional, default "auto"
      The countries that contain the holidays you intend to model.
  
          * If "auto", uses a default list of countries
            that contain the default ``holidays_to_model_separately``.
            See `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.HOLIDAY_LOOKUP_COUNTRIES_AUTO`.
          * If a list, must be a list of country names.
          * If None or an empty list, no holidays are modeled.
  
  holidays_to_model_separately : `list` [`str`] or "auto" or `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.ALL_HOLIDAYS_IN_COUNTRIES` or None, optional, default "auto"  # noqa: E501
      Which holidays to include in the model.
      The model creates a separate key, value for each item in ``holidays_to_model_separately`` and their neighboring
      days. If ``auto_holiday = False``, the other holidays in the countries are grouped together as a single effect.
      If ``auto_holiday = True``, the other holidays will be processed by ``HolidayGrouper`` and assigned to
      holiday groups based on their estimated impact.
  
          * If "auto", uses a default list of important holidays.
            See `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.HOLIDAYS_TO_MODEL_SEPARATELY_AUTO`.
          * If `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.ALL_HOLIDAYS_IN_COUNTRIES`,
            uses all available holidays in ``holiday_lookup_countries``. This can often create a model that has too many parameters,
            and should typically be avoided. This argument is only valid when ``auto_holiday = False``. When ``auto_holiday`` is
            set to `True`, a `ValueError` would be raised.
          * If a list, must be a list of holiday names.
          * If None or an empty list, all holidays in ``holiday_lookup_countries`` are grouped together
            as a single effect.
  
      Use ``holiday_lookup_countries`` to provide a list of countries where these holiday occur.
  holiday_pre_num_days : `int`, default 2
      Model holiday effects for ``holiday_pre_num_days`` days before the holiday. When ``auto_holiday = False``,
      this also applies to the holidays passed in through `daily_event_df_dict`.
  holiday_post_num_days : `int`, default 2
      Model holiday effects for ``holiday_post_num_days`` days after the holiday. When ``auto_holiday = False``,
      this also applies to the holidays passed in through `daily_event_df_dict`.
  holiday_pre_post_num_dict : `dict` [`str`, (`int`, `int`)] or None, default None
      Overrides ``pre_num`` and ``post_num`` for each holiday in
      ``holidays_to_model_separately``.
      For example, if ``holidays_to_model_separately`` contains "Thanksgiving" and "Labor Day",
      this parameter can be set to ``{"Thanksgiving": [1, 3], "Labor Day": [1, 2]}``,
      denoting that the "Thanksgiving" ``pre_num`` is 1 and ``post_num`` is 3, and "Labor Day"
      ``pre_num`` is 1 and ``post_num`` is 2.
      Holidays not specified use the default given by ``pre_num`` and ``post_num``.
  daily_event_df_dict : `dict` [`str`, `pandas.DataFrame`] or None, default None
      A dictionary of data frames, each representing events data for the corresponding key.
      Specifies additional events to include besides the holidays specified above.
      The usage and format requirement of `daily_event_df_dict` is different based on whether
      ``auto_holiday`` is enabled.  When ``auto_holiday = False``, these events will be
      directly appended in the return and used in modeling. When ``auto_holiday = True``, this
      will be used as sources of holidays, together with holidays constructed through
      `holiday_lookup_countries`. Holiday grouper will be run on all these holidays and their
      neighboring days unless they are specified in `holidays_to_model_separately`.
  
      When ``auto_holiday = False``, the format is the same as in
      `~greykite.algo.forecast.silverkite.SilverkiteForecast.forecast`.
      The DataFrame has two columns:
  
          - The first column contains event dates. Must be in a format
            recognized by `pandas.to_datetime`. Must be at daily
            frequency for proper join. It is joined against the time
            in ``df``, converted to a day:
            ``pd.to_datetime(pd.DatetimeIndex(df[time_col]).date)``.
          - The second column contains the event label for each date.
  
      The column order is important; column names are ignored.
      The event dates must span their occurrences in both the training
      and future prediction period.
  
      During modeling, each key in the dictionary is mapped to a categorical variable
      named ``f"{EVENT_PREFIX}_{key}"``, whose value at each timestamp is specified
      by the corresponding DataFrame.
  
      For example, to manually specify a yearly event on September 1
      during a training/forecast period that spans 2020-2022::
  
          daily_event_df_dict = {
              "custom_event": pd.DataFrame({
                  "date": ["2020-09-01", "2021-09-01", "2022-09-01"],
                  "label": ["is_event", "is_event", "is_event"]
              })
          }
  
      It's possible to specify multiple events in the same df. Two events,
      ``"sep"`` and ``"oct"`` are specified below for 2020-2021::
  
          daily_event_df_dict = {
              "custom_event": pd.DataFrame({
                  "date": ["2020-09-01", "2020-10-01", "2021-09-01", "2021-10-01"],
                  "event_name": ["sep", "oct", "sep", "oct"]
              })
          }
  
      Use multiple keys if two events may fall on the same date. These events
      must be in separate DataFrames::
  
          daily_event_df_dict = {
              "fixed_event": pd.DataFrame({
                  "date": ["2020-09-01", "2021-09-01", "2022-09-01"],
                  "event_name": "fixed_event"
              }),
              "moving_event": pd.DataFrame({
                  "date": ["2020-09-01", "2021-08-28", "2022-09-03"],
                  "event_name": "moving_event"
              }),
          }
  
      The multiple event specification can be used even if events never overlap. An
      equivalent specification to the second example::
  
          daily_event_df_dict = {
              "sep": pd.DataFrame({
                  "date": ["2020-09-01", "2021-09-01"],
                  "event_name": "is_event"
              }),
              "oct": pd.DataFrame({
                  "date": ["2020-10-01", "2021-10-01"],
                  "event_name": "is_event"
              }),
          }
  
      Note: All these events are automatically added to the model. There is no need
      to specify them in ``extra_pred_cols`` as you would for
      `~greykite.algo.forecast.silverkite.SilverkiteForecast.forecast`.
  
      Note: Do not use `~greykite.common.constants.EVENT_DEFAULT`
      in the second column. This is reserved to indicate dates that do not
      correspond to an event.
  
      When ``auto_holiday = True``, this dictionary is used to pass in holidays that will
      be used by `HolidayGrouper`. Each key corresponds to a holiday name, and the
      Dataframe has at least one column that contains event dates:
  
          - The event date column used will be the first column in each data frame
            that can be recognized by `pandas.to_datetime`. Must be at daily
            frequency for proper join. It is joined against the time in ``df``,
            converted to a day:
            ``pd.to_datetime(pd.DatetimeIndex(df[time_col]).date)``.
          - The other columns in the dataframe will be ignored.
  
      The event dates must span their occurrences in both the training
      and future prediction period.
  auto_holiday_params : `dict` or None, default None
      This dictionary takes in parameters that can be passed in and used by holiday grouper when
      ``auto_holiday`` is set to `True`. When ``auto_holiday = False``, this will not be used. Please see
      `~greykite.algo.forecast.silverkite.forecast_simple_silverkite.SimpleSilverkiteForecast.__get_silverkite_holidays`
      for more details.
  daily_event_neighbor_impact : `int`, `list` [`int`], callable or None, default None
      The impact of neighboring timestamps of the events in ``event_df_dict``.
      This is for daily events so the units below are all in days.
  
      For example, if the data is weekly ("W-SUN") and an event is daily,
      it may not exactly fall on the weekly date.
      But you can specify for New Year's day on 1/1, it affects all dates
      in the week, e.g. 12/31, 1/1, ..., 1/6, then it will be mapped to the weekly date.
      In this case you may want to map a daily event's date to a few dates,
      and can specify
      ``neighbor_impact=lambda x: [x-timedelta(days=x.isocalendar()[2]-1) + timedelta(days=i) for i in range(7)]``.
  
      Another example is that the data is rolling 7 day daily data,
      thus a holiday may affect the t, t+1, ..., t+6 dates.
      You can specify ``neighbor_impact=7``.
  
      If input is `int`, the mapping is t, t+1, ..., t+neighbor_impact-1.
      If input is `list`, the mapping is [t+x for x in neighbor_impact].
      If input is a function, it maps each daily event's date to a list of dates.
  daily_event_shifted_effect : `list` [`str`] or None, default None
      Additional neighbor events based on given events.
      For example, passing ["-1D", "7D"] will add extra daily events which are 1 day before
      and 7 days after the given events.
      Offset format is {d}{freq} with any integer plus a frequency string.
      Must be parsable by pandas ``to_offset``.
      The new events' names will be the current events' names with suffix "{offset}_before" or "{offset}_after".
      For example, if we have an event named "US_Christmas Day",
      a "7D" shift will have name "US_Christmas Day_7D_after".
      This is useful when you expect an offset of the current holidays also has impact on the
      time series, or you want to interact the lagged terms with autoregression.
      If ``daily_event_neighbor_impact`` is also specified, this will be applied after adding neighboring days.
  auto_growth : `bool`, default False
      Whether to automatically infer growth configuration.
      If True, the growth term and automatically changepoint detection configuration
      will be inferred from input timeseries,
      and the following parameters will be ignored:
  
          * "growth_term"
          * "changepoints_dict" (Except parameters that controls how custom changepoint
            are combined with automatically detected changepoints. These parameters include
            "dates", "combine_changepoint_min_distance" and "keep_detected".)
  
      For detail, see
      `~greykite.algo.changepoint.adalasso.auto_changepoint_params.generate_trend_changepoint_detection_params`.
  changepoints_dict : `dict` or None, optional, default None
      Specifies the changepoint configuration.
  
      ``"method"``: `str`
          The method to locate changepoints.
          Valid options:
  
              - "uniform". Places n_changepoints evenly spaced changepoints to allow growth to change.
              - "custom". Places changepoints at the specified dates.
              - "auto". Automatically detects change points. For configuration, see
                `~greykite.algo.changepoint.adalasso.changepoint_detector.ChangepointDetector.find_trend_changepoints`
  
          Additional keys to provide parameters for each particular method are described below.
      ``"continuous_time_col"``: `str`, optional
          Column to apply ``growth_func`` to, to generate changepoint features
          Typically, this should match the growth term in the model
      ``"growth_func"``: callable or None, optional
          Growth function (scalar -> scalar). Changepoint features are created
          by applying ``growth_func`` to ``continuous_time_col`` with offsets.
          If None, uses identity function to use ``continuous_time_col`` directly
          as growth term
          If changepoints_dict["method"] == "uniform", this other key is required:
  
              ``"n_changepoints"``: int
                  number of changepoints to evenly space across training period
  
          If changepoints_dict["method"] == "custom", this other key is required:
  
              ``"dates"``: Iterable[Union[int, float, str, datetime]]
                  Changepoint dates. Must be parsable by pd.to_datetime.
                  Changepoints are set at the closest time on or after these dates
                  in the dataset.
  
          If changepoints_dict["method"] == "auto", the keys that matches the parameters in
          `~greykite.algo.changepoint.adalasso.changepoint_detector.ChangepointDetector.find_trend_changepoints`,
          except ``df``, ``time_col`` and ``value_col``, are optional.
          Extra keys also include "dates", "combine_changepoint_min_distance" and "keep_detected" to specify
          additional custom trend changepoints. These three parameters correspond to the three parameters
          "custom_changepoint_dates", "min_distance" and "keep_detected" in
          `~greykite.algo.changepoint.adalasso.changepoints_utils.combine_detected_and_custom_trend_changepoints`.
  
  auto_seasonality : `bool`, default False
      Whether to automatically infer seasonality orders.
      If True, the seasonality orders will be automatically inferred from input timeseries
      and the following parameters will be ignored unless the value is ``False``:
  
          * "yearly_seasonality"
          * "quarterly_seasonality"
          * "monthly_seasonality"
          * "weekly_seasonality"
          * "daily_seasonality"
  
      If any of the above parameter's value is ``False``,
      the corresponding seasonality order will be forced to be zero,
      regardless of the inferring result.
      For detail, see `~greykite.algo.common.seasonality_inferrer.SeasonalityInferrer`.
  yearly_seasonality : `str` or `bool` or `int`
      Determines the yearly seasonality.
      'auto', True, False, or a number for the Fourier order
  quarterly_seasonality : `str` or `bool` or `int`
      Determines the quarterly seasonality.
      'auto', True, False, or a number for the Fourier order
  monthly_seasonality : `str` or `bool` or `int`
      Determines the monthly seasonality.
      'auto', True, False, or a number for the Fourier order
  weekly_seasonality : `str` or `bool` or `int`
      Determines the weekly seasonality.
      'auto', True, False, or a number for the Fourier order
  daily_seasonality : `str` or `bool` or `int`
      Determines the daily seasonality.
      'auto', True, False, or a number for the Fourier order
  max_daily_seas_interaction_order : `int` or None, optional, default `None`
      Max fourier order for interaction terms with daily seasonality.
      If None, uses all available terms.
  max_weekly_seas_interaction_order : `int` or None, optional, default `None`
      Max fourier order for interaction terms with weekly seasonality.
      If None, uses all available terms.
  autoreg_dict : `dict` or `str` or None, optional, default `None`
      If a `dict`: A dictionary with arguments for `~greykite.common.features.timeseries_lags.build_autoreg_df`.
      That function's parameter ``value_col`` is inferred from the input of
      current function ``self.forecast``. Other keys are:
  
          ``"lag_dict"`` : `dict` or None
          ``"agg_lag_dict"`` : `dict` or None
          ``"series_na_fill_func"`` : callable
  
      If a `str`: The string will represent a method and a dictionary will be
      constructed using that `str`.
      Currently only implemented method is "auto" which uses
      `~greykite.algo.forecast.silverkite.SilverkiteForecast.__get_default_autoreg_dict`
      to create a dictionary.
      See more details for above parameters in
      `~greykite.common.features.timeseries_lags.build_autoreg_df`.
  past_df : `pandas.DataFrame` or None, default None
      The past df used for building autoregression features.
      This is not necessarily needed since imputation is available,
      however, if such data is available but not used in training for speed purposes,
      they can be passed here to build more accurate autoregression features.
  lagged_regressor_dict : `dict` or None, default None
      A dictionary with arguments for `greykite.common.features.timeseries_lags.build_autoreg_df_multi`.
      The keys of the dictionary are the target lagged regressor column names.
      It can leverage the regressors included in ``df``.
      The value of each key is either a `dict` or `str`.
      If `dict`, it has the following keys:
  
          ``"lag_dict"`` : `dict` or None
          ``"agg_lag_dict"`` : `dict` or None
          ``"series_na_fill_func"`` : callable
  
      If `str`, it represents a method and a dictionary will be constructed using that `str`.
      Currently the only implemented method is "auto" which uses
      `~greykite.algo.forecast.silverkite.SilverkiteForecast.__get_default_lagged_regressor_dict`
      to create a dictionary for each lagged regressor.
      An example::
  
          lagged_regressor_dict = {
              "regressor1": {
                  "lag_dict": {"orders": [1, 2, 3]},
                  "agg_lag_dict": {
                      "orders_list": [[7, 7 * 2, 7 * 3]],
                      "interval_list": [(8, 7 * 2)]},
                  "series_na_fill_func": lambda s: s.bfill().ffill()},
              "regressor2": "auto"}
  seasonality_changepoints_dict : `dict` or None, optional, default `None`
      The parameter dictionary for seasonality change point detection. Parameters are in
      `~greykite.algo.changepoint.adalasso.changepoint_detector.ChangepointDetector.find_seasonality_changepoints`.
      Note ``df``, ``time_col``, ``value_col`` and ``trend_changepoints`` are auto populated,
      and do not need to be provided.
  min_admissible_value : `float` or None, optional, default `None`
      The minimum admissible value to return during prediction.
      If None, no limit is applied.
  max_admissible_value : `float` or None, optional, default `None`
      The maximum admissible value to return during prediction.
      If None, no limit is applied.
  uncertainty_dict : `dict` or None, optional, default `None`
      How to fit the uncertainty model. A dictionary with keys:
          ``"uncertainty_method"`` : `str`
              The title of the method.
              Only "simple_conditional_residuals" is implemented
              in ``fit_prediction_model`` which calculates CIs using residuals
          ``"params"``: `dict`
              A dictionary of parameters needed for
              the requested ``uncertainty_method``. For example, for
              ``uncertainty_method="simple_conditional_residuals"``, see
              parameters of `~greykite.algo.uncertainty.conditional.conf_interval.conf_interval`,
              listed briefly here:
  
                  ``"conditional_cols"``
                  ``"quantiles"``
                  ``"quantile_estimation_method"``
                  ``"sample_size_thresh"``
                  ``"small_sample_size_method"``
                  ``"small_sample_size_quantile"``
  
      If None, no uncertainty intervals are calculated.
  normalize_method : `str` or None, default None
      If a string is provided, it will be used as the normalization method
      in `~greykite.common.features.normalize.normalize_df`, passed via
      the argument ``method``.
      Available options are: "zero_to_one", "statistical", "minus_half_to_half", "zero_at_origin".
      If None, no normalization will be performed.
      See that function for more details.
  growth_term : `str` or None, optional, default "ct1"
      How to model the growth. Valid options are
      {"linear", "quadratic", "sqrt", "cuberoot"}.
      See `~greykite.common.constants.GrowthColEnum`.
  regressor_cols : `list` [`str`] or None, optional, default None
      The columns in ``df`` to use as regressors.
      These must be provided during prediction as well.
  feature_sets_enabled: `dict` [`str`, `bool` or "auto" or None] or `bool` or "auto" or None, default "auto"
      Whether to include interaction terms and categorical variables to increase model flexibility.
  
      If a `dict`, boolean values indicate whether include various sets of features in the model.
      The following keys are recognized
      (from `~greykite.algo.forecast.silverkite.constants.silverkite_column.SilverkiteColumn`):
  
          ``"COLS_HOUR_OF_WEEK"`` : `str`
              Constant hour of week effect
          ``"COLS_WEEKEND_SEAS"`` : `str`
              Daily seasonality interaction with is_weekend
          ``"COLS_DAY_OF_WEEK_SEAS"`` : `str`
              Daily seasonality interaction with day of week
          ``"COLS_TREND_DAILY_SEAS"`` : `str`
              Allow daily seasonality to change over time by is_weekend
          ``"COLS_EVENT_SEAS"`` : `str`
              Allow sub-daily event effects
          ``"COLS_EVENT_WEEKEND_SEAS"`` : `str`
              Allow sub-daily event effect to interact with is_weekend
          ``"COLS_DAY_OF_WEEK"`` : `str`
              Constant day of week effect
          ``"COLS_TREND_WEEKEND"`` : `str`
              Allow trend (growth, changepoints) to interact with is_weekend
          ``"COLS_TREND_DAY_OF_WEEK"`` : `str`
              Allow trend to interact with day of week
          ``"COLS_TREND_WEEKLY_SEAS"`` : `str`
              Allow weekly seasonality to change over time
  
      The following dictionary values are recognized:
  
          - True: include the feature set in the model
          - False: do not include the feature set in the model
          - None: do not include the feature set in the model
          - "auto" or not provided: use the default setting based on data frequency and size
  
      If not a `dict`:
  
          - if a boolean, equivalent to a dictionary with all values set to the boolean.
          - if None, equivalent to a dictionary with all values set to False.
          - if "auto", equivalent to a dictionary with all values set to "auto".
  
  extra_pred_cols : `list` [`str`] or None, optional, default `None`
      Columns to include in ``extra_pred_cols`` for ``SilverkiteForecast::forecast``.
      Other columns are added to ``extra_pred_cols`` by the other
      parameters of this function (i.e. ``holidays_*``, ``growth_term``,
      ``regressors``, ``feature_sets_enabled``).
      If `None`, treated is the same as [].
  drop_pred_cols : `list` [`str`] or None, default None
      Names of predictor columns to be dropped from the final model.
      Ignored if None.
  explicit_pred_cols : `list` [`str`] or None, default None
      Names of the explicit predictor columns which will be
      the only variables in the final model. Note that this overwrites
      the generated predictors in the model and may include new
      terms not appearing in the predictors (e.g. interaction terms).
      Ignored if None.
  regression_weight_col : `str` or None, default None
      The column name for the weights to be used in weighted regression version
      of applicable machine-learning models.
  simulation_based : `bool`, default False
      Boolean to specify if the future predictions are to be using simulations
      or not.
      Note that this is only used in deciding what parameters should be
      used for certain components e.g. autoregression, if automatic methods
      are requested. However, the auto-settings and the prediction settings
      regarding using simulations should match.
  simulation_num : `int`, default 10
      The number of simulations for when simulations are used for generating
      forecasts and prediction intervals.
  fast_simulation: `bool`, default False
      Deterimes if fast simulations are to be used. This only impacts models
      which include auto-regression. This method will only generate one simulation
      without any error being added and then add the error using the volatility
      model. The advantage is a major boost in speed during inference and the
      disadvantage is potentially less accurate prediction intervals.
  remove_intercept : `bool`, default False
      Whether to remove explicit and implicit intercepts.
      By default, `patsy` will make the design matrix always full rank.
      It will always include an intercept term unless we specify "-1" or "+0".
      However, if there are categorical variables, even we specify "-1" or "+0",
      it will include an implicit intercept by adding all levels of a categorical
      variable into the design matrix.
      Sometimes we don't want this to happen.
      Setting this parameter to True will remove both explicit and implicit intercepts.
  
  
  Returns
  -------
  parameters : `dict`
      Parameters to call :func:`~greykite.algo.forecast.silverkite.SilverkiteForecast.forecast`.
code: def convert_params(
      self,
      df: pd.DataFrame,
      time_col: str,
      value_col: str,
      time_properties: Optional[Dict] = None,
      freq: Optional[str] = None,
      forecast_horizon: Optional[int] = None,
      origin_for_time_vars: Optional[float] = None,
      train_test_thresh: Optional[datetime] = None,
      training_fraction: Optional[float] = 0.9,
      fit_algorithm: str = "ridge",
      fit_algorithm_params: Optional[Dict] = None,
      auto_holiday: bool = False,
      holidays_to_model_separately: Optional[
          Union[str, List[str]]
      ] = "auto",
      holiday_lookup_countries: Optional[
          Union[str, List[str]]
      ] = "auto",
      holiday_pre_num_days: int = 2,
      holiday_post_num_days: int = 2,
      holiday_pre_post_num_dict: Optional[Dict] = None,
      daily_event_df_dict: Optional[Dict] = None,
      auto_holiday_params: Optional[Dict] = None,
      daily_event_neighbor_impact: Optional[
          Union[int, List[int], callable]
      ] = None,
      daily_event_shifted_effect: Optional[List[str]] = None,
      auto_growth: bool = False,
      changepoints_dict: Optional[Dict] = None,
      auto_seasonality: bool = False,
      yearly_seasonality: Union[bool, str, int] = "auto",
      quarterly_seasonality: Union[bool, str, int] = "auto",
      monthly_seasonality: Union[bool, str, int] = "auto",
      weekly_seasonality: Union[bool, str, int] = "auto",
      daily_seasonality: Union[bool, str, int] = "auto",
      max_daily_seas_interaction_order: Optional[int] = None,
      max_weekly_seas_interaction_order: Optional[int] = None,
      autoreg_dict: Optional[Dict] = None,
      past_df: Optional[pd.DataFrame] = None,
      lagged_regressor_dict: Optional[Dict] = None,
      seasonality_changepoints_dict: Optional[Dict] = None,
      min_admissible_value: Optional[float] = None,
      max_admissible_value: Optional[float] = None,
      uncertainty_dict: Optional[Dict] = None,
      normalize_method: Optional[str] = None,
      growth_term: Optional[str] = cst.GrowthColEnum.linear.name,
      regressor_cols: Optional[List[str]] = None,
      feature_sets_enabled: Optional[
          Union[bool, str, Dict[str, Optional[Union[bool, str]]]]
      ] = "auto",
      extra_pred_cols: Optional[List[str]] = None,
      drop_pred_cols: Optional[List[str]] = None,
      explicit_pred_cols: Optional[List[str]] = None,
      regression_weight_col: Optional[str] = None,
      simulation_based: Optional[bool] = False,
      simulation_num: int = 10,
      fast_simulation: bool = False,
      remove_intercept: bool = False,
  ):
      """Converts parameters of
      :func:`~greykite.algo.forecast.silverkite.forecast_simple_silverkite` into those
      of :func:`~greykite.algo.forecast.forecast_silverkite.SilverkiteForecast::forecast`.
  
      Makes it easier to set parameters to ``SilverkiteForecast::forecast`` suitable for most forecasting problems.
      Provides data-aware defaults for seasonality and interaction terms. Provides a simple
      configuration of holidays from an internal holiday database, and user-friendly configuration
      for growth and regressors.
  
      These parameters can be set from a plain-text config (e.g. no pandas dataframes).
      The parameter list is intentionally flat to facilitate hyperparameter grid search. Every
      parameter is either a parameter of ``SilverkiteForecast::forecast`` or a tuning parameter.
  
      Notes
      -----
      The basic parameters are identical to ``SilverkiteForecast::forecast``.
      The more complex parameters are specified via config parameters:
  
      * ``daily_event_df_dict`` (via ``holiday*``)
      * ``fs_components_df`` (via `*_seasonality``)
      * ``extra_pred_cols`` (via ``holiday*``, ``*seas*``, ``growth_term``,
        ``regressor_cols``, ``feature_sets_enabled``, ``extra_pred_cols``)
  
      Parameters
      ----------
      df : `pandas.DataFrame`
          A data frame which includes the timestamp column
          as well as the value column. This is the ``df`` for
          training the model, not for future prediction.
      time_col : `str`
          The column name in `df` representing time for the time series data
          The time column can be anything that can be parsed by pandas DatetimeIndex
      value_col: `str`
          The column name which has the value of interest to be forecasted
      time_properties : `dict` [`str`, `any`] or None, optional
          Time properties dictionary (likely produced by
          `~greykite.common.time_properties_forecast.get_forecast_time_properties`)
          with keys:
  
              ``"ts"`` : `UnivariateTimeSeries` or None
                  ``df`` converted to a ``UnivariateTimeSeries``.
              ``"period"`` : `int`
                  Period of each observation (i.e. minimum time between observations, in seconds).
              ``"simple_freq"`` : `SimpleTimeFrequencyEnum`
                  ``SimpleTimeFrequencyEnum`` member corresponding to data frequency.
              ``"num_training_points"`` : `int`
                  Number of observations for training.
              ``"num_training_days"`` : `int`
                  Number of days for training.
              ``"start_year"`` : `int`
                  Start year of the training period.
              ``"end_year"`` : `int`
                  End year of the forecast period.
              ``"origin_for_time_vars"`` : `float`
                  Continuous time representation of the first date in ``df``.
  
          In this function,
  
              - ``start_year`` and ``end_year`` are used to define ``daily_event_df_dict``.
              - ``simple_freq`` and ``num_training_days`` are used to define ``fs_components_df``.
              - ``simple_freq`` and ``num_training_days`` are used to set default ``feature_sets_enabled``.
              - ``origin_for_time_vars`` is used to set default ``origin_for_time_vars``.
              - the other parameters are ignored
  
          It is okay if ``num_training_points``, ``num_training_days``, ``start_year``, ``end_year``
          are computed for a superset of ``df``. This allows CV splits and backtest, which train on
          partial data, to use the same data-aware model parameters as the forecast on all training data.
  
          If None, the values are computed for ``df``. This corresponds to using the same
          modeling *approach* on the CV splits and backtest from `forecast_pipeline`, without
          requiring the same parameters. In this case, make sure ``forecast_horizon`` is at
          least as large as the test period for the split, to ensure all holidays are captured.
      freq : `str` or None, optional, default `None`
          Frequency of input data.
          Used to compute ``time_properties`` only if ``time_properties is None``.
          Frequency strings can have multiples, e.g. '5H'.
          See https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
          for a list of frequency aliases.
          If None, inferred by `pandas.infer_freq`.
          Provide this parameter if ``df`` has missing timepoints.
      forecast_horizon : `int` or None, optional, default `None`
          Number of periods to forecast into the future. Must be > 0.
          Used to compute ``time_properties`` only if ``time_properties is None``.
          If None, default is determined by input data frequency.
          Used to determine forecast end date, to pull the appropriate holiday data.
          Should be at least as large as the prediction period (if this function
          is called from ``forecast_pipeline``, the prediction period for different
          splits is set via ``cv_horizon``, ``test_horizon``, ``forecast_horizon``).
      origin_for_time_vars : `float` or None, optional, default `None`
          The time origin used to create continuous variables for time.
          If None, uses the value from ``time_properties``.
      train_test_thresh : `datetime.datetime` or None, optional, default `None`
          e.g. datetime.datetime(2019, 6, 30)
          The threshold for training and testing split.
          Note that the final returned model is trained using all data.
          If None, training split is based on ``training_fraction``.
      training_fraction : `float` or None, optional, default 0.9
          The fraction of data used for training (0.0 to 1.0)
          Used only if ``train_test_thresh is None``.
          If this is also None or 1.0, then we skip testing
          and train on the entire dataset.
      fit_algorithm : `str`, optional, default "linear"
          The type of predictive model used in fitting.
  
          See `~greykite.algo.common.ml_models.fit_model_via_design_matrix`
          for available options and their parameters.
      fit_algorithm_params : `dict` or None, optional, default None
          Parameters passed to the requested fit_algorithm.
          If None, uses the defaults in `~greykite.algo.common.ml_models.fit_model_via_design_matrix`.
      auto_holiday : `bool`, default False
          Whether to automatically infer holiday configuration based on the input timeseries.
          If True, holiday groups will be constructed through estimated holiday effects. If False,
          the other specified holiday configuration will be used to generate holiday features.
          Notice that the following parameters serve different uses in two case:
  
              * "Daily_event_df_dict": When ``auto_holiday = False``, this specifies additional events that are
                ready for use in modeling; when ``auto_holiday = True``, this provides a list of holidays that
                can be processed and used as inputs for ``HolidayGrouper``.
              * "auto_holiday_params": It contains customized parameter values that can be used for ``HolidayGrouper``.
               When ``auto_holiday = False``, this will not be used.
  
          For details, see `~greykite.algo.common.holiday_grouper.HolidayGrouper`.
      holiday_lookup_countries : `list` [`str`] or "auto" or None, optional, default "auto"
          The countries that contain the holidays you intend to model.
  
              * If "auto", uses a default list of countries
                that contain the default ``holidays_to_model_separately``.
                See `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.HOLIDAY_LOOKUP_COUNTRIES_AUTO`.
              * If a list, must be a list of country names.
              * If None or an empty list, no holidays are modeled.
  
      holidays_to_model_separately : `list` [`str`] or "auto" or `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.ALL_HOLIDAYS_IN_COUNTRIES` or None, optional, default "auto"  # noqa: E501
          Which holidays to include in the model.
          The model creates a separate key, value for each item in ``holidays_to_model_separately`` and their neighboring
          days. If ``auto_holiday = False``, the other holidays in the countries are grouped together as a single effect.
          If ``auto_holiday = True``, the other holidays will be processed by ``HolidayGrouper`` and assigned to
          holiday groups based on their estimated impact.
  
              * If "auto", uses a default list of important holidays.
                See `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.HOLIDAYS_TO_MODEL_SEPARATELY_AUTO`.
              * If `~greykite.algo.forecast.silverkite.constants.silverkite_holiday.SilverkiteHoliday.ALL_HOLIDAYS_IN_COUNTRIES`,
                uses all available holidays in ``holiday_lookup_countries``. This can often create a model that has too many parameters,
                and should typically be avoided. This argument is only valid when ``auto_holiday = False``. When ``auto_holiday`` is
                set to `True`, a `ValueError` would be raised.
              * If a list, must be a list of holiday names.
              * If None or an empty list, all holidays in ``holiday_lookup_countries`` are grouped together
                as a single effect.
  
          Use ``holiday_lookup_countries`` to provide a list of countries where these holiday occur.
      holiday_pre_num_days : `int`, default 2
          Model holiday effects for ``holiday_pre_num_days`` days before the holiday. When ``auto_holiday = False``,
          this also applies to the holidays passed in through `daily_event_df_dict`.
      holiday_post_num_days : `int`, default 2
          Model holiday effects for ``holiday_post_num_days`` days after the holiday. When ``auto_holiday = False``,
          this also applies to the holidays passed in through `daily_event_df_dict`.
      holiday_pre_post_num_dict : `dict` [`str`, (`int`, `int`)] or None, default None
          Overrides ``pre_num`` and ``post_num`` for each holiday in
          ``holidays_to_model_separately``.
          For example, if ``holidays_to_model_separately`` contains "Thanksgiving" and "Labor Day",
          this parameter can be set to ``{"Thanksgiving": [1, 3], "Labor Day": [1, 2]}``,
          denoting that the "Thanksgiving" ``pre_num`` is 1 and ``post_num`` is 3, and "Labor Day"
          ``pre_num`` is 1 and ``post_num`` is 2.
          Holidays not specified use the default given by ``pre_num`` and ``post_num``.
      daily_event_df_dict : `dict` [`str`, `pandas.DataFrame`] or None, default None
          A dictionary of data frames, each representing events data for the corresponding key.
          Specifies additional events to include besides the holidays specified above.
          The usage and format requirement of `daily_event_df_dict` is different based on whether
          ``auto_holiday`` is enabled.  When ``auto_holiday = False``, these events will be
          directly appended in the return and used in modeling. When ``auto_holiday = True``, this
          will be used as sources of holidays, together with holidays constructed through
          `holiday_lookup_countries`. Holiday grouper will be run on all these holidays and their
          neighboring days unless they are specified in `holidays_to_model_separately`.
  
          When ``auto_holiday = False``, the format is the same as in
          `~greykite.algo.forecast.silverkite.SilverkiteForecast.forecast`.
          The DataFrame has two columns:
  
              - The first column contains event dates. Must be in a format
                recognized by `pandas.to_datetime`. Must be at daily
                frequency for proper join. It is joined against the time
                in ``df``, converted to a day:
                ``pd.to_datetime(pd.DatetimeIndex(df[time_col]).date)``.
              - The second column contains the event label for each date.
  
          The column order is important; column names are ignored.
          The event dates must span their occurrences in both the training
          and future prediction period.
  
          During modeling, each key in the dictionary is mapped to a categorical variable
          named ``f"{EVENT_PREFIX}_{key}"``, whose value at each timestamp is specified
          by the corresponding DataFrame.
  
          For example, to manually specify a yearly event on September 1
          during a training/forecast period that spans 2020-2022::
  
              daily_event_df_dict = {
                  "custom_event": pd.DataFrame({
                      "date": ["2020-09-01", "2021-09-01", "2022-09-01"],
                      "label": ["is_event", "is_event", "is_event"]
                  })
              }
  
          It's possible to specify multiple events in the same df. Two events,
          ``"sep"`` and ``"oct"`` are specified below for 2020-2021::
  
              daily_event_df_dict = {
                  "custom_event": pd.DataFrame({
                      "date": ["2020-09-01", "2020-10-01", "2021-09-01", "2021-10-01"],
                      "event_name": ["sep", "oct", "sep", "oct"]
                  })
              }
  
          Use multiple keys if two events may fall on the same date. These events
          must be in separate DataFrames::
  
              daily_event_df_dict = {
                  "fixed_event": pd.DataFrame({
                      "date": ["2020-09-01", "2021-09-01", "2022-09-01"],
                      "event_name": "fixed_event"
                  }),
                  "moving_event": pd.DataFrame({
                      "date": ["2020-09-01", "2021-08-28", "2022-09-03"],
                      "event_name": "moving_event"
                  }),
              }
  
          The multiple event specification can be used even if events never overlap. An
          equivalent specification to the second example::
  
              daily_event_df_dict = {
                  "sep": pd.DataFrame({
                      "date": ["2020-09-01", "2021-09-01"],
                      "event_name": "is_event"
                  }),
                  "oct": pd.DataFrame({
                      "date": ["2020-10-01", "2021-10-01"],
                      "event_name": "is_event"
                  }),
              }
  
          Note: All these events are automatically added to the model. There is no need
          to specify them in ``extra_pred_cols`` as you would for
          `~greykite.algo.forecast.silverkite.SilverkiteForecast.forecast`.
  
          Note: Do not use `~greykite.common.constants.EVENT_DEFAULT`
          in the second column. This is reserved to indicate dates that do not
          correspond to an event.
  
          When ``auto_holiday = True``, this dictionary is used to pass in holidays that will
          be used by `HolidayGrouper`. Each key corresponds to a holiday name, and the
          Dataframe has at least one column that contains event dates:
  
              - The event date column used will be the first column in each data frame
                that can be recognized by `pandas.to_datetime`. Must be at daily
                frequency for proper join. It is joined against the time in ``df``,
                converted to a day:
                ``pd.to_datetime(pd.DatetimeIndex(df[time_col]).date)``.
              - The other columns in the dataframe will be ignored.
  
          The event dates must span their occurrences in both the training
          and future prediction period.
      auto_holiday_params : `dict` or None, default None
          This dictionary takes in parameters that can be passed in and used by holiday grouper when
          ``auto_holiday`` is set to `True`. When ``auto_holiday = False``, this will not be used. Please see
          `~greykite.algo.forecast.silverkite.forecast_simple_silverkite.SimpleSilverkiteForecast.__get_silverkite_holidays`
          for more details.
      daily_event_neighbor_impact : `int`, `list` [`int`], callable or None, default None
          The impact of neighboring timestamps of the events in ``event_df_dict``.
          This is for daily events so the units below are all in days.
  
          For example, if the data is weekly ("W-SUN") and an event is daily,
          it may not exactly fall on the weekly date.
          But you can specify for New Year's day on 1/1, it affects all dates
          in the week, e.g. 12/31, 1/1, ..., 1/6, then it will be mapped to the weekly date.
          In this case you may want to map a daily event's date to a few dates,
          and can specify
          ``neighbor_impact=lambda x: [x-timedelta(days=x.isocalendar()[2]-1) + timedelta(days=i) for i in range(7)]``.
  
          Another example is that the data is rolling 7 day daily data,
          thus a holiday may affect the t, t+1, ..., t+6 dates.
          You can specify ``neighbor_impact=7``.
  
          If input is `int`, the mapping is t, t+1, ..., t+neighbor_impact-1.
          If input is `list`, the mapping is [t+x for x in neighbor_impact].
          If input is a function, it maps each daily event's date to a list of dates.
      daily_event_shifted_effect : `list` [`str`] or None, default None
          Additional neighbor events based on given events.
          For example, passing ["-1D", "7D"] will add extra daily events which are 1 day before
          and 7 days after the given events.
          Offset format is {d}{freq} with any integer plus a frequency string.
          Must be parsable by pandas ``to_offset``.
          The new events' names will be the current events' names with suffix "{offset}_before" or "{offset}_after".
          For example, if we have an event named "US_Christmas Day",
          a "7D" shift will have name "US_Christmas Day_7D_after".
          This is useful when you expect an offset of the current holidays also has impact on the
          time series, or you want to interact the lagged terms with autoregression.
          If ``daily_event_neighbor_impact`` is also specified, this will be applied after adding neighboring days.
      auto_growth : `bool`, default False
          Whether to automatically infer growth configuration.
          If True, the growth term and automatically changepoint detection configuration
          will be inferred from input timeseries,
          and the following parameters will be ignored:
  
              * "growth_term"
              * "changepoints_dict" (Except parameters that controls how custom changepoint
                are combined with automatically detected changepoints. These parameters include
                "dates", "combine_changepoint_min_distance" and "keep_detected".)
  
          For detail, see
          `~greykite.algo.changepoint.adalasso.auto_changepoint_params.generate_trend_changepoint_detection_params`.
      changepoints_dict : `dict` or None, optional, default None
          Specifies the changepoint configuration.
  
          ``"method"``: `str`
              The method to locate changepoints.
              Valid options:
  
                  - "uniform". Places n_changepoints evenly spaced changepoints to allow growth to change.
                  - "custom". Places changepoints at the specified dates.
                  - "auto". Automatically detects change points. For configuration, see
                    `~greykite.algo.changepoint.adalasso.changepoint_detector.ChangepointDetector.find_trend_changepoints`
  
              Additional keys to provide parameters for each particular method are described below.
          ``"continuous_time_col"``: `str`, optional
              Column to apply ``growth_func`` to, to generate changepoint features
              Typically, this should match the growth term in the model
          ``"growth_func"``: callable or None, optional
              Growth function (scalar -> scalar). Changepoint features are created
              by applying ``growth_func`` to ``continuous_time_col`` with offsets.
              If None, uses identity function to use ``continuous_time_col`` directly
              as growth term
              If changepoints_dict["method"] == "uniform", this other key is required:
  
                  ``"n_changepoints"``: int
                      number of changepoints to evenly space across training period
  
              If changepoints_dict["method"] == "custom", this other key is required:
  
                  ``"dates"``: Iterable[Union[int, float, str, datetime]]
                      Changepoint dates. Must be parsable by pd.to_datetime.
                      Changepoints are set at the closest time on or after these dates
                      in the dataset.
  
              If changepoints_dict["method"] == "auto", the keys that matches the parameters in
              `~greykite.algo.changepoint.adalasso.changepoint_detector.ChangepointDetector.find_trend_changepoints`,
              except ``df``, ``time_col`` and ``value_col``, are optional.
              Extra keys also include "dates", "combine_changepoint_min_distance" and "keep_detected" to specify
              additional custom trend changepoints. These three parameters correspond to the three parameters
              "custom_changepoint_dates", "min_distance" and "keep_detected" in
              `~greykite.algo.changepoint.adalasso.changepoints_utils.combine_detected_and_custom_trend_changepoints`.
  
      auto_seasonality : `bool`, default False
          Whether to automatically infer seasonality orders.
          If True, the seasonality orders will be automatically inferred from input timeseries
          and the following parameters will be ignored unless the value is ``False``:
  
              * "yearly_seasonality"
              * "quarterly_seasonality"
              * "monthly_seasonality"
              * "weekly_seasonality"
              * "daily_seasonality"
  
          If any of the above parameter's value is ``False``,
          the corresponding seasonality order will be forced to be zero,
          regardless of the inferring result.
          For detail, see `~greykite.algo.common.seasonality_inferrer.SeasonalityInferrer`.
      yearly_seasonality : `str` or `bool` or `int`
          Determines the yearly seasonality.
          'auto', True, False, or a number for the Fourier order
      quarterly_seasonality : `str` or `bool` or `int`
          Determines the quarterly seasonality.
          'auto', True, False, or a number for the Fourier order
      monthly_seasonality : `str` or `bool` or `int`
          Determines the monthly seasonality.
          'auto', True, False, or a number for the Fourier order
      weekly_seasonality : `str` or `bool` or `int`
          Determines the weekly seasonality.
          'auto', True, False, or a number for the Fourier order
      daily_seasonality : `str` or `bool` or `int`
          Determines the daily seasonality.
          'auto', True, False, or a number for the Fourier order
      max_daily_seas_interaction_order : `int` or None, optional, default `None`
          Max fourier order for interaction terms with daily seasonality.
          If None, uses all available terms.
      max_weekly_seas_interaction_order : `int` or None, optional, default `None`
          Max fourier order for interaction terms with weekly seasonality.
          If None, uses all available terms.
      autoreg_dict : `dict` or `str` or None, optional, default `None`
          If a `dict`: A dictionary with arguments for `~greykite.common.features.timeseries_lags.build_autoreg_df`.
          That function's parameter ``value_col`` is inferred from the input of
          current function ``self.forecast``. Other keys are:
  
              ``"lag_dict"`` : `dict` or None
              ``"agg_lag_dict"`` : `dict` or None
              ``"series_na_fill_func"`` : callable
  
          If a `str`: The string will represent a method and a dictionary will be
          constructed using that `str`.
          Currently only implemented method is "auto" which uses
          `~greykite.algo.forecast.silverkite.SilverkiteForecast.__get_default_autoreg_dict`
          to create a dictionary.
          See more details for above parameters in
          `~greykite.common.features.timeseries_lags.build_autoreg_df`.
      past_df : `pandas.DataFrame` or None, default None
          The past df used for building autoregression features.
          This is not necessarily needed since imputation is available,
          however, if such data is available but not used in training for speed purposes,
          they can be passed here to build more accurate autoregression features.
      lagged_regressor_dict : `dict` or None, default None
          A dictionary with arguments for `greykite.common.features.timeseries_lags.build_autoreg_df_multi`.
          The keys of the dictionary are the target lagged regressor column names.
          It can leverage the regressors included in ``df``.
          The value of each key is either a `dict` or `str`.
          If `dict`, it has the following keys:
  
              ``"lag_dict"`` : `dict` or None
              ``"agg_lag_dict"`` : `dict` or None
              ``"series_na_fill_func"`` : callable
  
          If `str`, it represents a method and a dictionary will be constructed using that `str`.
          Currently the only implemented method is "auto" which uses
          `~greykite.algo.forecast.silverkite.SilverkiteForecast.__get_default_lagged_regressor_dict`
          to create a dictionary for each lagged regressor.
          An example::
  
              lagged_regressor_dict = {
                  "regressor1": {
                      "lag_dict": {"orders": [1, 2, 3]},
                      "agg_lag_dict": {
                          "orders_list": [[7, 7 * 2, 7 * 3]],
                          "interval_list": [(8, 7 * 2)]},
                      "series_na_fill_func": lambda s: s.bfill().ffill()},
                  "regressor2": "auto"}
      seasonality_changepoints_dict : `dict` or None, optional, default `None`
          The parameter dictionary for seasonality change point detection. Parameters are in
          `~greykite.algo.changepoint.adalasso.changepoint_detector.ChangepointDetector.find_seasonality_changepoints`.
          Note ``df``, ``time_col``, ``value_col`` and ``trend_changepoints`` are auto populated,
          and do not need to be provided.
      min_admissible_value : `float` or None, optional, default `None`
          The minimum admissible value to return during prediction.
          If None, no limit is applied.
      max_admissible_value : `float` or None, optional, default `None`
          The maximum admissible value to return during prediction.
          If None, no limit is applied.
      uncertainty_dict : `dict` or None, optional, default `None`
          How to fit the uncertainty model. A dictionary with keys:
              ``"uncertainty_method"`` : `str`
                  The title of the method.
                  Only "simple_conditional_residuals" is implemented
                  in ``fit_prediction_model`` which calculates CIs using residuals
              ``"params"``: `dict`
                  A dictionary of parameters needed for
                  the requested ``uncertainty_method``. For example, for
                  ``uncertainty_method="simple_conditional_residuals"``, see
                  parameters of `~greykite.algo.uncertainty.conditional.conf_interval.conf_interval`,
                  listed briefly here:
  
                      ``"conditional_cols"``
                      ``"quantiles"``
                      ``"quantile_estimation_method"``
                      ``"sample_size_thresh"``
                      ``"small_sample_size_method"``
                      ``"small_sample_size_quantile"``
  
          If None, no uncertainty intervals are calculated.
      normalize_method : `str` or None, default None
          If a string is provided, it will be used as the normalization method
          in `~greykite.common.features.normalize.normalize_df`, passed via
          the argument ``method``.
          Available options are: "zero_to_one", "statistical", "minus_half_to_half", "zero_at_origin".
          If None, no normalization will be performed.
          See that function for more details.
      growth_term : `str` or None, optional, default "ct1"
          How to model the growth. Valid options are
          {"linear", "quadratic", "sqrt", "cuberoot"}.
          See `~greykite.common.constants.GrowthColEnum`.
      regressor_cols : `list` [`str`] or None, optional, default None
          The columns in ``df`` to use as regressors.
          These must be provided during prediction as well.
      feature_sets_enabled: `dict` [`str`, `bool` or "auto" or None] or `bool` or "auto" or None, default "auto"
          Whether to include interaction terms and categorical variables to increase model flexibility.
  
          If a `dict`, boolean values indicate whether include various sets of features in the model.
          The following keys are recognized
          (from `~greykite.algo.forecast.silverkite.constants.silverkite_column.SilverkiteColumn`):
  
              ``"COLS_HOUR_OF_WEEK"`` : `str`
                  Constant hour of week effect
              ``"COLS_WEEKEND_SEAS"`` : `str`
                  Daily seasonality interaction with is_weekend
              ``"COLS_DAY_OF_WEEK_SEAS"`` : `str`
                  Daily seasonality interaction with day of week
              ``"COLS_TREND_DAILY_SEAS"`` : `str`
                  Allow daily seasonality to change over time by is_weekend
              ``"COLS_EVENT_SEAS"`` : `str`
                  Allow sub-daily event effects
              ``"COLS_EVENT_WEEKEND_SEAS"`` : `str`
                  Allow sub-daily event effect to interact with is_weekend
              ``"COLS_DAY_OF_WEEK"`` : `str`
                  Constant day of week effect
              ``"COLS_TREND_WEEKEND"`` : `str`
                  Allow trend (growth, changepoints) to interact with is_weekend
              ``"COLS_TREND_DAY_OF_WEEK"`` : `str`
                  Allow trend to interact with day of week
              ``"COLS_TREND_WEEKLY_SEAS"`` : `str`
                  Allow weekly seasonality to change over time
  
          The following dictionary values are recognized:
  
              - True: include the feature set in the model
              - False: do not include the feature set in the model
              - None: do not include the feature set in the model
              - "auto" or not provided: use the default setting based on data frequency and size
  
          If not a `dict`:
  
              - if a boolean, equivalent to a dictionary with all values set to the boolean.
              - if None, equivalent to a dictionary with all values set to False.
              - if "auto", equivalent to a dictionary with all values set to "auto".
  
      extra_pred_cols : `list` [`str`] or None, optional, default `None`
          Columns to include in ``extra_pred_cols`` for ``SilverkiteForecast::forecast``.
          Other columns are added to ``extra_pred_cols`` by the other
          parameters of this function (i.e. ``holidays_*``, ``growth_term``,
          ``regressors``, ``feature_sets_enabled``).
          If `None`, treated is the same as [].
      drop_pred_cols : `list` [`str`] or None, default None
          Names of predictor columns to be dropped from the final model.
          Ignored if None.
      explicit_pred_cols : `list` [`str`] or None, default None
          Names of the explicit predictor columns which will be
          the only variables in the final model. Note that this overwrites
          the generated predictors in the model and may include new
          terms not appearing in the predictors (e.g. interaction terms).
          Ignored if None.
      regression_weight_col : `str` or None, default None
          The column name for the weights to be used in weighted regression version
          of applicable machine-learning models.
      simulation_based : `bool`, default False
          Boolean to specify if the future predictions are to be using simulations
          or not.
          Note that this is only used in deciding what parameters should be
          used for certain components e.g. autoregression, if automatic methods
          are requested. However, the auto-settings and the prediction settings
          regarding using simulations should match.
      simulation_num : `int`, default 10
          The number of simulations for when simulations are used for generating
          forecasts and prediction intervals.
      fast_simulation: `bool`, default False
          Deterimes if fast simulations are to be used. This only impacts models
          which include auto-regression. This method will only generate one simulation
          without any error being added and then add the error using the volatility
          model. The advantage is a major boost in speed during inference and the
          disadvantage is potentially less accurate prediction intervals.
      remove_intercept : `bool`, default False
          Whether to remove explicit and implicit intercepts.
          By default, `patsy` will make the design matrix always full rank.
          It will always include an intercept term unless we specify "-1" or "+0".
          However, if there are categorical variables, even we specify "-1" or "+0",
          it will include an implicit intercept by adding all levels of a categorical
          variable into the design matrix.
          Sometimes we don't want this to happen.
          Setting this parameter to True will remove both explicit and implicit intercepts.
  
  
      Returns
      -------
      parameters : `dict`
          Parameters to call :func:`~greykite.algo.forecast.silverkite.SilverkiteForecast.forecast`.
      """
      if extra_pred_cols is None:
          extra_pred_cols = []
      else:
          # Does not modify the input list
          extra_pred_cols = extra_pred_cols.copy()
  
      # Specifies regressors (via ``extra_pred_cols``)
      if regressor_cols is None:
          regressor_cols = []
      extra_pred_cols += regressor_cols
  
      if time_properties is None:
          # ``df`` only contains the dates for training,
          # so we can use ``use_univariate_ts=False``.
          # ``forecast_horizon`` must be at least as large as
          # the actual size of the test set / forecast set
          # in order to pull all holidays
          time_properties = get_forecast_time_properties(
              df=df,
              time_col=time_col,
              value_col=value_col,
              freq=freq,
              regressor_cols=regressor_cols,
              forecast_horizon=forecast_horizon,
          )
  
      if time_properties is not None:
          forecast_horizon = forecast_horizon or time_properties.get(
              "forecast_horizon"
          )
  
      if origin_for_time_vars is None:
          origin_for_time_vars = time_properties["origin_for_time_vars"]
  
      # Specifies seasonality (added to ``extra_pred_cols`` by `SilverkiteForecast::forecast`)
      # Seasonality orders are automatically inferred if ``auto_seasonality`` is True,
      # and they are pulled from configuration if False.
      if auto_seasonality:
          seasonality_dict = get_auto_seasonality(
              df=df,
              time_col=time_col,
              value_col=value_col,
              yearly_seasonality=(yearly_seasonality is not False),
              quarterly_seasonality=(
                  quarterly_seasonality is not False
              ),
              monthly_seasonality=(monthly_seasonality is not False),
              weekly_seasonality=(weekly_seasonality is not False),
              daily_seasonality=(daily_seasonality is not False),
          )
      else:
          seasonality_dict = {
              "yearly_seasonality": yearly_seasonality,
              "quarterly_seasonality": quarterly_seasonality,
              "monthly_seasonality": monthly_seasonality,
              "weekly_seasonality": weekly_seasonality,
              "daily_seasonality": daily_seasonality,
          }
  
      fs_components_df = self.__get_silverkite_seasonality(
          simple_freq=time_properties["simple_freq"].name,
          num_days=time_properties["num_training_days"],
          seasonality=seasonality_dict,
      )
  
      # Specifies growth (via ``extra_pred_cols``)
      # The ``growth_term`` and ``changepoints_dict`` are automatically inferred
      # and overridden if ``auto_growth`` is True.
      if auto_growth:
          growth_result = get_auto_growth(
              df=df,
              time_col=time_col,
              value_col=value_col,
              forecast_horizon=forecast_horizon,
              changepoints_dict_override=changepoints_dict,
          )
          growth_term = growth_result["growth_term"]
          changepoints_dict = growth_result["changepoints_dict"]
      growth_term_formula = None
      if growth_term is not None:
          growth_term_formula = GrowthColEnum[growth_term].value
          extra_pred_cols += [growth_term_formula]
  
      # Specifies events (via ``daily_event_df_dict``, ``extra_pred_cols``).
      # Constant daily effect.
      daily_event_df_dict = self.__get_silverkite_holidays(
          auto_holiday=auto_holiday,
          holiday_lookup_countries=holiday_lookup_countries,
          holidays_to_model_separately=holidays_to_model_separately,
          start_year=time_properties["start_year"],
          end_year=time_properties["end_year"],
          pre_num=holiday_pre_num_days,
          post_num=holiday_post_num_days,
          pre_post_num_dict=holiday_pre_post_num_dict,
          auto_holiday_params=auto_holiday_params,
          df=df,
          time_col=time_col,
          value_col=value_col,
          daily_event_df_dict=daily_event_df_dict,
      )
  
      extra_pred_cols += get_event_pred_cols(
          daily_event_df_dict, daily_event_shifted_effect
      )
  
      # Specifies ``extra_pred_cols`` (interactions and additional model terms).
      # Seasonality interaction order is limited by the available order and max requested.
      daily_seas_interaction_order = self.__get_seasonality_order_from_dataframe(
          seasonality=self._silverkite_seasonality_enum.DAILY_SEASONALITY.value,
          fs=fs_components_df,
          max_order=max_daily_seas_interaction_order,
      )
  
      weekly_seas_interaction_order = self.__get_seasonality_order_from_dataframe(
          seasonality=self._silverkite_seasonality_enum.WEEKLY_SEASONALITY.value,
          fs=fs_components_df,
          max_order=max_weekly_seas_interaction_order,
      )
  
      # updates `changepoints_dict`, unchanged if not "method" == "auto"
      changepoints_dict, changepoint_detector = get_changepoints_dict(
          df=df,
          time_col=time_col,
          value_col=value_col,
          changepoints_dict=changepoints_dict,
      )
  
      # determines changepoint column names
      if changepoints_dict is not None:
          changepoints = (
              get_changepoint_features_and_values_from_config(
                  df=df,  # the training dataset
                  time_col=time_col,
                  changepoints_dict=changepoints_dict,
                  origin_for_time_vars=origin_for_time_vars,
              )
          )
          changepoint_cols = changepoints["changepoint_cols"]
      else:
          changepoint_cols = []
  
      feature_sets_enabled = self.__get_feature_sets_enabled(
          simple_freq=time_properties["simple_freq"].name,
          num_days=time_properties["num_training_days"],
          feature_sets_enabled=feature_sets_enabled,
      )
  
      model_feature_terms = self.__get_feature_sets_terms(
          daily_event_df_dict=daily_event_df_dict,
          daily_seas_interaction_order=daily_seas_interaction_order,
          weekly_seas_interaction_order=weekly_seas_interaction_order,
          growth_term=growth_term_formula,
          changepoint_cols=changepoint_cols,
      )
  
      # extends ``extra_pred_cols`` by the requested feature sets from ``feature_sets_enabled``
      for (
          feature_set_name,
          feature_set_terms,
      ) in model_feature_terms.items():
          if feature_sets_enabled[feature_set_name]:
              extra_pred_cols += feature_set_terms
      extra_pred_cols = unique_elements_in_list(extra_pred_cols)
  
      # the parameters to call ``SilverkiteForecast::forecast``
      # parameters that are directly passed through are noted below
      parameters = dict(
          df=df,  # pass-through
          time_col=time_col,  # pass-through
          value_col=value_col,  # pass-through
          origin_for_time_vars=origin_for_time_vars,
          extra_pred_cols=extra_pred_cols,
          drop_pred_cols=drop_pred_cols,
          explicit_pred_cols=explicit_pred_cols,
          train_test_thresh=train_test_thresh,  # pass-through
          training_fraction=training_fraction,  # pass-through
          fit_algorithm=fit_algorithm,  # pass-through
          fit_algorithm_params=fit_algorithm_params,  # pass-through
          daily_event_df_dict=daily_event_df_dict,
          daily_event_neighbor_impact=daily_event_neighbor_impact,  # pass-through
          daily_event_shifted_effect=daily_event_shifted_effect,  # pass-through
          fs_components_df=fs_components_df,
          autoreg_dict=autoreg_dict,  # pass-through
          past_df=past_df,  # pass-through
          lagged_regressor_dict=lagged_regressor_dict,  # pass-through
          changepoints_dict=changepoints_dict,  # pass-through
          seasonality_changepoints_dict=seasonality_changepoints_dict,  # pass-through
          changepoint_detector=changepoint_detector,
          min_admissible_value=min_admissible_value,  # pass-through
          max_admissible_value=max_admissible_value,  # pass-through
          uncertainty_dict=uncertainty_dict,
          normalize_method=normalize_method,  # pass-through
          regression_weight_col=regression_weight_col,  # pass-through
          forecast_horizon=forecast_horizon,  # pass-through
          simulation_based=simulation_based,  # pass-through
          simulation_num=simulation_num,  # pass-through
          fast_simulation=fast_simulation,  # pass-through
          remove_intercept=remove_intercept,  # pass-through
      )
  
      return parameters
  
imports: from datetime import datetime
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Type
  from typing import Union
  import pandas
  from greykite.algo.changepoint.adalasso.changepoint_detector import get_changepoints_dict
  from greykite.algo.forecast.silverkite.auto_config import get_auto_growth
  from greykite.algo.forecast.silverkite.auto_config import get_auto_holidays
  from greykite.algo.forecast.silverkite.auto_config import get_auto_seasonality
  from greykite.algo.forecast.silverkite.constants.silverkite_column import SilverkiteColumn
  from greykite.algo.forecast.silverkite.constants.silverkite_constant import SilverkiteConstant
  from greykite.algo.forecast.silverkite.constants.silverkite_constant import default_silverkite_constant
  from greykite.algo.forecast.silverkite.constants.silverkite_holiday import SilverkiteHoliday
  from greykite.algo.forecast.silverkite.constants.silverkite_time_frequency import SilverkiteTimeFrequencyEnum
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import cols_interact
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import generate_holiday_events
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import get_event_pred_cols
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import patsy_categorical_term
  from greykite.common import constants
  from greykite.common.constants import GrowthColEnum
  from greykite.common.enums import SimpleTimeFrequencyEnum
  from greykite.common.enums import TimeEnum
  from greykite.common.features.timeseries_features import get_available_holidays_across_countries
  from greykite.common.features.timeseries_features import get_changepoint_features_and_values_from_config
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import unique_elements_in_list
  from greykite.common.python_utils import update_dictionary
  from greykite.common.time_properties_forecast import get_forecast_time_properties
label_desc: Use image node_id 2 for calling the SimpleSilverkiteForecast obj's underlying member method code with example usage: obj.convert_params(df, time_col, value_col, time_properties, freq, forecast_horizon, origin_for_time_vars, train_test_thresh, training_fraction, fit_algorithm, fit_algorithm_params, auto_holiday, holidays_to_model_separately, holiday_lookup_countries, holiday_pre_num_days, holiday_post_num_days, holiday_pre_post_num_dict, daily_event_df_dict, auto_holiday_params, daily_event_neighbor_impact, daily_event_shifted_effect, auto_growth, changepoints_dict, auto_seasonality, yearly_seasonality, quarterly_seasonality, monthly_seasonality, weekly_seasonality, daily_seasonality, max_daily_seas_interaction_order, max_weekly_seas_interaction_order, autoreg_dict, past_df, lagged_regressor_dict, seasonality_changepoints_dict, min_admissible_value, max_admissible_value, uncertainty_dict, normalize_method, growth_term, regressor_cols, feature_sets_enabled, extra_pred_cols, drop_pred_cols, explicit_pred_cols, regression_weight_col, simulation_based, simulation_num, fast_simulation, remove_intercept) and returns: parameters