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: Returns default feature sets based on training data frequency and size.
  
  Parameters
  ----------
  simple_freq: `str`, default SimpleTimeFrequencyEnum.DAY.name
      SimpleTimeFrequencyEnum member that best matches the input data frequency
      according to `get_simple_time_frequency_from_period`
  num_days: `int`, default 1000
      Number of days of observations in the input data
  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".
  
  Returns
  -------
  feature_sets_enabled : `dict` [`str`, `bool`]
      Indicates which feature sets will be added to the model. Feature sets are determined
      by `get_model_feature_terms` and may be empty (e.g. if there are no events,
      there is no event:seasonality interaction)
      Same valid options as `feature_sets_enabled` parameter.
code: def __get_feature_sets_enabled(
      self,
      simple_freq=SimpleTimeFrequencyEnum.DAY.name,
      num_days=1000,
      feature_sets_enabled="auto",
  ):
      """Returns default feature sets based on training data frequency and size.
  
      Parameters
      ----------
      simple_freq: `str`, default SimpleTimeFrequencyEnum.DAY.name
          SimpleTimeFrequencyEnum member that best matches the input data frequency
          according to `get_simple_time_frequency_from_period`
      num_days: `int`, default 1000
          Number of days of observations in the input data
      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".
  
      Returns
      -------
      feature_sets_enabled : `dict` [`str`, `bool`]
          Indicates which feature sets will be added to the model. Feature sets are determined
          by `get_model_feature_terms` and may be empty (e.g. if there are no events,
          there is no event:seasonality interaction)
          Same valid options as `feature_sets_enabled` parameter.
      """
      feature_sets_enabled_default = {
          self._silverkite_column.COLS_HOUR_OF_WEEK: False,
          self._silverkite_column.COLS_WEEKEND_SEAS: False,
          self._silverkite_column.COLS_DAY_OF_WEEK_SEAS: False,
          self._silverkite_column.COLS_TREND_DAILY_SEAS: False,
          self._silverkite_column.COLS_EVENT_SEAS: False,
          self._silverkite_column.COLS_EVENT_WEEKEND_SEAS: False,
          self._silverkite_column.COLS_DAY_OF_WEEK: False,
          self._silverkite_column.COLS_TREND_WEEKEND: False,
          self._silverkite_column.COLS_TREND_DAY_OF_WEEK: False,
          self._silverkite_column.COLS_TREND_WEEKLY_SEAS: False,
      }
      frequency = SimpleTimeFrequencyEnum[simple_freq].value
  
      # for sub-daily data
      if (
          frequency.seconds_per_observation
          <= SimpleTimeFrequencyEnum.HOUR.value.seconds_per_observation
      ):
          if num_days >= TimeEnum.ONE_MONTH_IN_DAYS.value:
              # hour of week offset, helps the fourier terms
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_HOUR_OF_WEEK
              ] = True
              # daily seasonality on weekday vs weekend
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_WEEKEND_SEAS
              ] = True
              # daily seasonality by day of week
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_DAY_OF_WEEK_SEAS
              ] = True
              # daily seasonality trend on weekday, weekend
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_TREND_DAILY_SEAS
              ] = True
  
          if num_days < 3 * TimeEnum.ONE_YEAR_IN_DAYS.value:
              # holiday daily seasonality
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_EVENT_SEAS
              ] = True
          else:
              # holiday daily seasonality that depends on weekend/weekday
              #   By pigeonhole principle, with reasonable assumption that a holiday must fall on a different
              #   day of the week for any three consecutive years (or else always be on the same day of week),
              #   it takes at most 3 years of training data to observe all weekend/weekday possibilities.
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_EVENT_WEEKEND_SEAS
              ] = True
  
      # for sub-weekly data
      if (
          frequency.seconds_per_observation
          <= SimpleTimeFrequencyEnum.DAY.value.seconds_per_observation
      ):
          # day of week offset, helps the fourier terms
          feature_sets_enabled_default[
              self._silverkite_column.COLS_DAY_OF_WEEK
          ] = True
  
          # allows different trend on weekday vs weekend
          if num_days >= TimeEnum.ONE_MONTH_IN_DAYS.value:
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_TREND_WEEKEND
              ] = True
  
          # allows trend interaction with day of week
          if num_days >= TimeEnum.ONE_QUARTER_IN_DAYS.value:
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_TREND_DAY_OF_WEEK
              ] = True
  
          if num_days >= TimeEnum.ONE_YEAR_IN_DAYS.value:
              # weekly seasonality trend over time
              feature_sets_enabled_default[
                  self._silverkite_column.COLS_TREND_WEEKLY_SEAS
              ] = True
  
      # None is treated the same as False.
      # Intuitively, feature_sets_enabled=None should
      #   mean no feature sets are enabled.
      if feature_sets_enabled is None:
          feature_sets_enabled = False
  
      # Overrides defaults with user provided dictionary
      if feature_sets_enabled == "auto":
          pass  # uses the automatic defaults directly
      elif isinstance(feature_sets_enabled, bool):
          # All values are set to the provided boolean value
          for k in feature_sets_enabled_default.keys():
              feature_sets_enabled_default[k] = feature_sets_enabled
      elif isinstance(feature_sets_enabled, dict):
          # Uses the boolean values in `feature_sets_enabled` to override `feature_sets_enabled_default`
          for setting, is_enabled in feature_sets_enabled.items():
              if setting not in feature_sets_enabled_default:
                  raise ValueError(
                      f"Unrecognized feature set: '{setting}'. Value feature sets are "
                      f"{list(feature_sets_enabled_default.keys())}"
                  )
  
              if is_enabled == "auto":
                  # "auto" values are considered not set by the user and fall back to the default
                  continue
              if is_enabled is True:
                  # User explicitly turned on this feature set.
                  feature_sets_enabled_default[setting] = True
              elif is_enabled is False or is_enabled is None:
                  # User explicitly turned off this feature set.
                  # None values are treated the same as False.
                  feature_sets_enabled_default[setting] = False
              else:
                  raise ValueError(
                      f"Unrecognized `feature_sets_enabled` dictionary value for key {setting}: "
                      f"expected bool or 'auto' or None. Found: {is_enabled}"
                  )
      else:
          raise ValueError(
              f"Unrecognized type for `feature_sets_enabled`: expected bool, dict, 'auto', or None. Found: {feature_sets_enabled}"
          )
      return feature_sets_enabled_default
  
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 7 for calling the SimpleSilverkiteForecast obj's underlying member method code with example usage: obj.__get_feature_sets_enabled(simple_freq, num_days, feature_sets_enabled) and returns: feature_sets_enabled_default