class_docstr: Base class for forecasters that use sliding windows.
class_docstr_tok: ["Base","class","for","forecasters","that","use","sliding","windows","."]
docstr: Dispatcher to in-sample and out-of-sample logic.
  
  In-sample logic is implemented in _predict_in_sample.
  Out-of-sample logic is implemented in _predict_fixed_cutoff.
docstr_tok: ["Dispatcher","to","in-sample","and","out-of-sample","logic",".","In-sample","logic","is","implemented","in","_predict_in_sample",".","Out-of-sample","logic","is","implemented","in","_predict_fixed_cutoff","."]
code: def _predict_boilerplate(self, fh, **kwargs):
      """Dispatcher to in-sample and out-of-sample logic.
  
      In-sample logic is implemented in _predict_in_sample.
      Out-of-sample logic is implemented in _predict_fixed_cutoff.
      """
      cutoff = self._cutoff
  
      # all values are out-of-sample
      if fh.is_all_out_of_sample(cutoff):
          y_pred = self._predict_fixed_cutoff(
              fh.to_out_of_sample(cutoff), **kwargs
          )
  
      # all values are in-sample
      elif fh.is_all_in_sample(self.cutoff):
          y_pred = self._predict_in_sample(
              fh.to_in_sample(cutoff), **kwargs
          )
  
      # both in-sample and out-of-sample values
      else:
          y_ins = self._predict_in_sample(
              fh.to_in_sample(cutoff), **kwargs
          )
          y_oos = self._predict_fixed_cutoff(
              fh.to_out_of_sample(cutoff), **kwargs
          )
  
          if isinstance(y_ins, pd.DataFrame) and isinstance(
              y_oos, pd.Series
          ):
              y_oos = y_oos.to_frame(y_ins.columns[0])
  
          y_pred = pd.concat([y_ins, y_oos])
  
      return y_pred
  
file_path: sktime/sktime/forecasting/base/_sktime.py
imports: import numpy
  import pandas
  from sktime.forecasting.base._base import BaseForecaster
  from sktime.split import CutoffSplitter
  from sktime.utils.datetime import _shift
label_desc: Use image node_id 2 for calling the _BaseWindowForecaster obj's underlying member method code with example usage: obj._predict_boilerplate(fh) and returns: y_pred