class_docstr: Forecaster that plays back known or prescribed values as forecasts.
  
  Takes a data set of "known future values" to produces these in the sktime interface.
  
  Common use cases for this forecaster:
  
  * as a dummy or naive forecaster with a known baseline expectation
  * as a forecaster with (non-naive) expert forecasts, "known" values as per expert
  * as a counterfactual in benchmarking experiments, "what if we knew the truth"
  * to pass forecast data values in a composite used for postprocessing,
    e.g., in combination with ReconcilerForecaster for an isolated reconciliation step
  
  When forecasting, uses `pandas.DataFrame.reindex` under the hood to obtain predicted
  values from `y_known`. Parameters other than `y_known` are directly passed
  on to `pandas.DataFrame.reindex`.
  
  Parameters
  ----------
  y_known : pd.DataFrame or pd.Series in one of the sktime compatible data formats
      should contain known values that the forecaster will replay in predict
      can also be in a non-pandas sktime data format, will then be coerced to pandas
  method : str or None, optional, default=None
      one of {None, 'backfill'/'bfill', 'pad'/'ffill', 'nearest'}
      method to use for imputing indices at which forecasts are unavailable in y_known
  fill_value : scalar, optional, default=np.NaN
      value to use for any missing values (e.g., if `method` is None)
  limit : int, optional, default=None=infinite
      maximum number of consecutive elements to bfill/ffill if `method=bfill`/`ffill`
  
  Examples
  --------
  >>> y_known = pd.DataFrame(range(100))
  >>> y_train = y_known[:24]
  >>>
  >>> from sktime.forecasting.dummy import ForecastKnownValues
  >>>
  >>> fcst = ForecastKnownValues(y_known)
  >>> fcst.fit(y_train, fh=[1, 2, 3])
  ForecastKnownValues(...)
  
  The forecast "plays back" the known/prescribed values from y_known
  
  >>> y_pred = fcst.predict()
docstr: Fit forecaster to training data.
  
  private _fit containing the core logic, called from fit
  
  Writes to self:
      Sets fitted model attributes ending in "_".
  
  Parameters
  ----------
  y : guaranteed to be of a type in self.get_tag("y_inner_mtype")
      Time series to which to fit the forecaster.
      if self.get_tag("scitype:y")=="univariate":
          guaranteed to have a single column/variable
      if self.get_tag("scitype:y")=="multivariate":
          guaranteed to have 2 or more columns
      if self.get_tag("scitype:y")=="both": no restrictions apply
  fh : guaranteed to be ForecastingHorizon or None, optional (default=None)
      The forecasting horizon with the steps ahead to to predict.
      Required (non-optional) here if self.get_tag("requires-fh-in-fit")==True
      Otherwise, if not passed in _fit, guaranteed to be passed in _predict
  X : optional (default=None)
      guaranteed to be of a type in self.get_tag("X_inner_mtype")
      Exogeneous time series to fit to.
  
  Returns
  -------
  self : reference to self
docstr_tok: ["Fit","forecaster","to","training","data",".","private","_fit","containing","the","core","logic",",","called","from","fit","Writes","to","self",":","Sets","fitted","model","attributes","ending","in","``","_","''",".","Parameters","--","--","--","--","--","y",":","guaranteed","to","be","of","a","type","in","self.get_tag","(","``","y_inner_mtype","''",")","Time","series","to","which","to","fit","the","forecaster",".","if","self.get_tag","(","``","scitype",":","y","''",")","==","''","univariate","''",":","guaranteed","to","have","a","single","column\/variable","if","self.get_tag","(","``","scitype",":","y","''",")","==","''","multivariate","''",":","guaranteed","to","have","2","or","more","columns","if","self.get_tag","(","``","scitype",":","y","''",")","==","''","both","''",":","no","restrictions","apply","fh",":","guaranteed","to","be","ForecastingHorizon","or","None",",","optional","(","default=None",")","The","forecasting","horizon","with","the","steps","ahead","to","to","predict",".","Required","(","non-optional",")","here","if","self.get_tag","(","``","requires-fh-in-fit","''",")","==True","Otherwise",",","if","not","passed","in","_fit",",","guaranteed","to","be","passed","in","_predict","X",":","optional","(","default=None",")","guaranteed","to","be","of","a","type","in","self.get_tag","(","``","X_inner_mtype","''",")","Exogeneous","time","series","to","fit","to",".","Returns","--","--","--","-","self",":","reference","to","self"]
code: def _fit(self, y, X, fh):
      """Fit forecaster to training data.
  
      private _fit containing the core logic, called from fit
  
      Writes to self:
          Sets fitted model attributes ending in "_".
  
      Parameters
      ----------
      y : guaranteed to be of a type in self.get_tag("y_inner_mtype")
          Time series to which to fit the forecaster.
          if self.get_tag("scitype:y")=="univariate":
              guaranteed to have a single column/variable
          if self.get_tag("scitype:y")=="multivariate":
              guaranteed to have 2 or more columns
          if self.get_tag("scitype:y")=="both": no restrictions apply
      fh : guaranteed to be ForecastingHorizon or None, optional (default=None)
          The forecasting horizon with the steps ahead to to predict.
          Required (non-optional) here if self.get_tag("requires-fh-in-fit")==True
          Otherwise, if not passed in _fit, guaranteed to be passed in _predict
      X : optional (default=None)
          guaranteed to be of a type in self.get_tag("X_inner_mtype")
          Exogeneous time series to fit to.
  
      Returns
      -------
      self : reference to self
      """
      # no fitting, we already know the forecast values
      return self
  
file_path: sktime/sktime/forecasting/dummy.py
imports: import pandas
  from sktime.datatypes import convert_to
  from sktime.forecasting.base import BaseForecaster
label_desc: Use image node_id 2 for calling the ForecastKnownValues obj's underlying member method code with example usage: obj._fit(y, X, fh) and returns: self