class_docstr: A base class for forecast models. Fits a timeseries and predicts future values
  
  Parameters
  ----------
  score_func : callable, optional, default=mean_squared_error
      Function to calculate model R2_null_model_score score,
      with signature (actual, predicted).
      `actual`, `predicted` are array-like with the same shape.
      Smaller values are better.
  
  coverage : float, optional, default=0.95
      intended coverage of the prediction bands (0.0 to 1.0)
      If None, the upper/lower predictions are not returned by `predict`
  
      Every subclass must use `coverage` to set prediction band width. This ensures a common
      BaseForecastEstimator interface for parameters used during fitting and forecast evaluation
  
  null_model_params : dict with arguments passed to DummyRegressor, optional, default=None
      Dictionary keys must be in ("strategy", "constant", "quantile")
      Defines null model. model score is R2_null_model_score of model error relative to null model, evaluated by score_func
      If None, model score is score_func of the model itself
  
  Attributes
  ----------
  null_model : DummyEstimator
      null model used to measure model score
  time_col_ : str
      Name of input data time column
  value_col_ : str
      Name of input data value column
  last_predicted_X_ : `pandas.DataFrame` or None
      The ``X`` last passed to ``self.predict()``.
      Used to speed up predictions if the same ``X`` is passed repeatedly.
      Resets to None when ``self.fit()`` is called.
  cached_predictions_ : `pandas.DataFrame` or None
      The return value of the last call to ``self.predict()``.
      Used to speed up predictions if the same ``X`` is passed repeatedly.
      Resets to None when ``self.fit()`` is called.
class_docstr_tok: ["A","base","class","for","forecast","models",".","Fits","a","timeseries","and","predicts","future","values","Parameters","--","--","--","--","--","score_func",":","callable",",","optional",",","default=mean_squared_error","Function","to","calculate","model","R2_null_model_score","score",",","with","signature","(","actual",",","predicted",")",".","`","actual","`",",","`","predicted","`","are","array-like","with","the","same","shape",".","Smaller","values","are","better",".","coverage",":","float",",","optional",",","default=0.95","intended","coverage","of","the","prediction","bands","(","0.0","to","1.0",")","If","None",",","the","upper\/lower","predictions","are","not","returned","by","`","predict","`","Every","subclass","must","use","`","coverage","`","to","set","prediction","band","width",".","This","ensures","a","common","BaseForecastEstimator","interface","for","parameters","used","during","fitting","and","forecast","evaluation","null_model_params",":","dict","with","arguments","passed","to","DummyRegressor",",","optional",",","default=None","Dictionary","keys","must","be","in","(","``","strategy","''",",","``","constant","''",",","``","quantile","''",")","Defines","null","model",".","model","score","is","R2_null_model_score","of","model","error","relative","to","null","model",",","evaluated","by","score_func","If","None",",","model","score","is","score_func","of","the","model","itself","Attributes","--","--","--","--","--","null_model",":","DummyEstimator","null","model","used","to","measure","model","score","time_col_",":","str","Name","of","input","data","time","column","value_col_",":","str","Name","of","input","data","value","column","last_predicted_X_",":","`","pandas.DataFrame","`","or","None","The","``","X","``","last","passed","to","``","self.predict","(",")","``",".","Used","to","speed","up","predictions","if","the","same","``","X","``","is","passed","repeatedly",".","Resets","to","None","when","``","self.fit","(",")","``","is","called",".","cached_predictions_",":","`","pandas.DataFrame","`","or","None","The","return","value","of","the","last","call","to","``","self.predict","(",")","``",".","Used","to","speed","up","predictions","if","the","same","``","X","``","is","passed","repeatedly",".","Resets","to","None","when","``","self.fit","(",")","``","is","called","."]
docstr: Initializes attributes common to every BaseForecastEstimator
  
  Subclasses must also have these parameters. Every subclass must call:
  
      super().__init__(score_func=score_func, coverage=coverage, null_model_params=null_model_params)
docstr_tok: ["Initializes","attributes","common","to","every","BaseForecastEstimator","Subclasses","must","also","have","these","parameters",".","Every","subclass","must","call",":","super","(",")",".__init__","(","score_func=score_func",",","coverage=coverage",",","null_model_params=null_model_params",")"]
code: def __init__(
      self,
      score_func=mean_squared_error,
      coverage=0.95,
      null_model_params=None,
  ):
      """Initializes attributes common to every BaseForecastEstimator
  
      Subclasses must also have these parameters. Every subclass must call:
  
          super().__init__(score_func=score_func, coverage=coverage, null_model_params=null_model_params)
  
      """
      self.score_func = score_func
      self.coverage = coverage
      self.null_model_params = null_model_params
  
      # initializes attributes defined in fit
      self.null_model = None
      self.time_col_ = None
      self.value_col_ = None
  
      # initializes attributes defined in predict
      self.last_predicted_X_ = (
          None  # the most recent X passed to self.predict()
      )
      self.cached_predictions_ = (
          None  # the most recent return value of self.predict()
      )
  
      # initializes attributes defined in ``fit_uncertainty``
      self.uncertainty_model = None
  
imports: from abc import ABC
  from abc import abstractmethod
  from typing import Optional
  import pandas
  from sklearn.base import BaseEstimator
  from sklearn.base import RegressorMixin
  from sklearn.metrics import mean_squared_error
  from greykite.common import constants
  from greykite.common.evaluation import r2_null_model_score
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.sklearn.estimator.null_model import DummyEstimator
  from greykite.sklearn.uncertainty.exceptions import UncertaintyError
  from greykite.sklearn.uncertainty.uncertainty_methods import UncertaintyMethodEnum
label_desc: Use image node_id 1 to create a new BaseForecastEstimator object from inherited base classes: BaseEstimator, RegressorMixin, ABC with example: obj = BaseForecastEstimator(score_func, coverage, null_model_params)