class_docstr: A template for :class: `~greykite.sklearn.estimator.lag_based_estimator.LagBasedEstimator`.
      
class_docstr_tok: ["A","template","for",":","class",":","`","~greykite.sklearn.estimator.lag_based_estimator.LagBasedEstimator","`","."]
docstr: Returns hyperparameter grid.
  
  Implements the method in `~greykite.framework.templates.base_template.BaseTemplate`.
  
  Uses ``self.config`` to generate the hyperparameter grid.
  
  Converts model components into
  :class:`~greykite.sklearn.estimator.lag_based_estimator.LagBasedEstimator`
  hyperparameters.
  
  Returns
  -------
  hyperparameter_grid : `dict`, `list` [`dict`] or None
      See :func:`~greykite.framework.pipeline.pipeline.forecast_pipeline`.
      The output dictionary values are lists, combined in grid search.
docstr_tok: ["Returns","hyperparameter","grid",".","Implements","the","method","in","`","~greykite.framework.templates.base_template.BaseTemplate","`",".","Uses","``","self.config","``","to","generate","the","hyperparameter","grid",".","Converts","model","components","into",":","class",":","`","~greykite.sklearn.estimator.lag_based_estimator.LagBasedEstimator","`","hyperparameters",".","Returns","--","--","--","-","hyperparameter_grid",":","`","dict","`",",","`","list","`","[","`","dict","`","]","or","None","See",":","func",":","`","~greykite.framework.pipeline.pipeline.forecast_pipeline","`",".","The","output","dictionary","values","are","lists",",","combined","in","grid","search","."]
code: def get_hyperparameter_grid(self):
      """Returns hyperparameter grid.
  
      Implements the method in `~greykite.framework.templates.base_template.BaseTemplate`.
  
      Uses ``self.config`` to generate the hyperparameter grid.
  
      Converts model components into
      :class:`~greykite.sklearn.estimator.lag_based_estimator.LagBasedEstimator`
      hyperparameters.
  
      Returns
      -------
      hyperparameter_grid : `dict`, `list` [`dict`] or None
          See :func:`~greykite.framework.pipeline.pipeline.forecast_pipeline`.
          The output dictionary values are lists, combined in grid search.
      """
      self.config.model_components_param = (
          self.apply_lag_based_model_components_defaults(
              model_components=self.config.model_components_param
          )
      )
  
      # Returns a single set of parameters for grid search
      hyperparameter_grid = {
          "estimator__freq": self.config.model_components_param.custom[
              "freq"
          ],
          "estimator__lag_unit": self.config.model_components_param.custom[
              "lag_unit"
          ],
          "estimator__lags": self.config.model_components_param.custom[
              "lags"
          ],
          "estimator__agg_func": self.config.model_components_param.custom[
              "agg_func"
          ],
          "estimator__agg_func_params": self.config.model_components_param.custom[
              "agg_func_params"
          ],
          "estimator__uncertainty_dict": self.config.model_components_param.uncertainty[
              "uncertainty_dict"
          ],
          "estimator__past_df": self.config.model_components_param.custom[
              "past_df"
          ],
          "estimator__series_na_fill_func": self.config.model_components_param.custom[
              "series_na_fill_func"
          ],
      }
  
      # Overwrites values by `model_components.hyperparameter_override`
      # This may produce a list of dictionaries for grid search.
      hyperparameter_grid = update_dictionaries(
          hyperparameter_grid,
          overwrite_dicts=self.config.model_components_param.hyperparameter_override,
      )
  
      # Ensures all items have the proper type for
      # `sklearn.model_selection.RandomizedSearchCV`.
      # List-type hyperparameters are specified below
      # with their accepted non-list type values.
      hyperparameter_grid = dictionaries_values_to_lists(
          hyperparameter_grid,
          hyperparameters_list_type={"estimator__lags": [None]},
      )
      return hyperparameter_grid
  
imports: import functools
  from typing import Dict
  from typing import Optional
  import pandas
  from greykite.common.aggregation_function_enum import AggregationFunctionEnum
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import dictionaries_values_to_lists
  from greykite.common.python_utils import update_dictionaries
  from greykite.common.python_utils import update_dictionary
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.base_template import BaseTemplate
  from greykite.sklearn.estimator.base_forecast_estimator import BaseForecastEstimator
  from greykite.sklearn.estimator.lag_based_estimator import LagBasedEstimator
  from greykite.sklearn.estimator.lag_based_estimator import LagUnitEnum
label_desc: Use image node_id 6 for calling the LagBasedTemplate obj's underlying member method code with example usage: obj.get_hyperparameter_grid() and returns: hyperparameter_grid