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: Creates forecast for dates specified in X
  
  To enable caching, every subclass must call this at the beginning
  of its ``.predict()``. Before returning the result, the subclass
  ``.predict()`` must set ``self.cached_predictions_`` to the return value.
  
  Parameters
  ----------
  X : `pandas.DataFrame`
      Input timeseries with timestamp column and any additional regressors.
      Timestamps are the dates for prediction.
      Value column, if provided in X, is ignored.
  y : ignored
  
  Returns
  -------
  predictions : `pandas.DataFrame`
      Forecasted values for the dates in X. Columns:
  
          - TIME_COL dates
          - PREDICTED_COL predictions
          - PREDICTED_LOWER_COL lower bound of predictions, optional
          - PREDICTED_UPPER_COL upper bound of predictions, optional
          - [other columns], optional
  
      ``PREDICTED_LOWER_COL`` and ``PREDICTED_UPPER_COL`` are present
      if ``self.coverage`` is not None.
docstr_tok: ["Creates","forecast","for","dates","specified","in","X","To","enable","caching",",","every","subclass","must","call","this","at","the","beginning","of","its","``",".predict","(",")","``",".","Before","returning","the","result",",","the","subclass","``",".predict","(",")","``","must","set","``","self.cached_predictions_","``","to","the","return","value",".","Parameters","--","--","--","--","--","X",":","`","pandas.DataFrame","`","Input","timeseries","with","timestamp","column","and","any","additional","regressors",".","Timestamps","are","the","dates","for","prediction",".","Value","column",",","if","provided","in","X",",","is","ignored",".","y",":","ignored","Returns","--","--","--","-","predictions",":","`","pandas.DataFrame","`","Forecasted","values","for","the","dates","in","X",".","Columns",":","-","TIME_COL","dates","-","PREDICTED_COL","predictions","-","PREDICTED_LOWER_COL","lower","bound","of","predictions",",","optional","-","PREDICTED_UPPER_COL","upper","bound","of","predictions",",","optional","-","[","other","columns","]",",","optional","``","PREDICTED_LOWER_COL","``","and","``","PREDICTED_UPPER_COL","``","are","present","if","``","self.coverage","``","is","not","None","."]
code: def predict(self, X, y=None):
      """Creates forecast for dates specified in X
  
      To enable caching, every subclass must call this at the beginning
      of its ``.predict()``. Before returning the result, the subclass
      ``.predict()`` must set ``self.cached_predictions_`` to the return value.
  
      Parameters
      ----------
      X : `pandas.DataFrame`
          Input timeseries with timestamp column and any additional regressors.
          Timestamps are the dates for prediction.
          Value column, if provided in X, is ignored.
      y : ignored
  
      Returns
      -------
      predictions : `pandas.DataFrame`
          Forecasted values for the dates in X. Columns:
  
              - TIME_COL dates
              - PREDICTED_COL predictions
              - PREDICTED_LOWER_COL lower bound of predictions, optional
              - PREDICTED_UPPER_COL upper bound of predictions, optional
              - [other columns], optional
  
          ``PREDICTED_LOWER_COL`` and ``PREDICTED_UPPER_COL`` are present
          if ``self.coverage`` is not None.
      """
      if self.cached_predictions_ is not None and X.equals(
          self.last_predicted_X_
      ):
          log_message(
              "Returning cached predictions.", LoggingLevelEnum.DEBUG
          )
          return self.cached_predictions_
      else:
          # Updates `last_predicted_X` to the new value.
          # To enable caching, the subclass must set
          # `self.cached_predictions` to the returned result.
          self.last_predicted_X_ = X
          return 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 3 for calling the BaseForecastEstimator obj's underlying member method code with example usage: obj.predict(X, y) and returns: self, None