class_docstr: Base template with common code used by multiple templates.
  
  Provides a particular modular approach to implement
  `~greykite.framework.templates.template_interface.TemplateInterface.apply_template_for_pipeline_params`.
  
  Includes the config defaults from
  `~greykite.framework.templates.forecast_config_defaults.ForecastConfigDefaults`.
  
  Subclasses must provide these properties / functions used by ``apply_template_for_pipeline_params``:
  
      - estimator (__init__ default value)
      - get_regressor_cols
      - get_lagged_regressor_info
      - get_hyperparameter_grid
  
  Subclasses may optionally want to override:
  
      - get_pipeline
      - get_forecast_time_properties
      - apply_metadata_defaults
      - apply_evaluation_metric_defaults
      - apply_evaluation_period_defaults
      - apply_computation_defaults
      - apply_model_components_defaults
      - apply_forecast_config_defaults
class_docstr_tok: ["Base","template","with","common","code","used","by","multiple","templates",".","Provides","a","particular","modular","approach","to","implement","`","~greykite.framework.templates.template_interface.TemplateInterface.apply_template_for_pipeline_params","`",".","Includes","the","config","defaults","from","`","~greykite.framework.templates.forecast_config_defaults.ForecastConfigDefaults","`",".","Subclasses","must","provide","these","properties","\/","functions","used","by","``","apply_template_for_pipeline_params","``",":","-","estimator","(","__init__","default","value",")","-","get_regressor_cols","-","get_lagged_regressor_info","-","get_hyperparameter_grid","Subclasses","may","optionally","want","to","override",":","-","get_pipeline","-","get_forecast_time_properties","-","apply_metadata_defaults","-","apply_evaluation_metric_defaults","-","apply_evaluation_period_defaults","-","apply_computation_defaults","-","apply_model_components_defaults","-","apply_forecast_config_defaults"]
code: def __init__(self, estimator: BaseForecastEstimator):
      # See attributes of `TemplateInterface` and `ForecastConfigDefaults`.
      # Note that `self.config` includes modifications after applying default values.
      super().__init__()
  
      self._estimator: BaseForecastEstimator = estimator
      """The estimator instance to use as the final step in the pipeline.
          An instance of `greykite.sklearn.estimator.base_forecast_estimator.BaseForecastEstimator`.
          """
  
      # Attributes used by `~greykite.framework.templates.base_template.apply_template_for_pipeline_params`.
      self.score_func = None
      """Score function used to select optimal model in CV."""
      self.score_func_greater_is_better = None
      """True if ``score_func`` is a score function, meaning higher is better,
          and False if it is a loss function, meaning lower is better.
          """
      self.regressor_cols = None
      """A list of regressor columns used in the training and prediction DataFrames.
          If None, no regressor columns are used.
          """
      self.lagged_regressor_cols = None
      """A list of lagged regressor columns used in the training and prediction DataFrames.
          If None, no lagged regressor columns are used.
          """
      self.pipeline = None
      """Pipeline to fit. The final named step must be called "estimator"."""
      self.time_properties = None
      """Time properties dictionary (likely produced by
          `~greykite.common.time_properties_forecast.get_forecast_time_properties`)
          """
      self.hyperparameter_grid = None
      """Sets properties of the steps in the pipeline,
          and specifies combinations to search over.
          Should be valid input to `sklearn.model_selection.GridSearchCV` (param_grid)
          or `sklearn.model_selection.RandomizedSearchCV` (param_distributions).
          """
  
imports: import functools
  from abc import ABC
  from abc import abstractmethod
  from typing import Dict
  from typing import Optional
  import pandas
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.time_properties_forecast import get_forecast_time_properties
  from greykite.framework.pipeline.utils import get_basic_pipeline
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.forecast_config_defaults import ForecastConfigDefaults
  from greykite.framework.templates.template_interface import TemplateInterface
  from greykite.sklearn.estimator.base_forecast_estimator import BaseForecastEstimator
label_desc: Use image node_id 1 to create a new BaseTemplate object from inherited base classes: TemplateInterface, ForecastConfigDefaults, ABC with example: obj = BaseTemplate(estimator)