class_docstr: Base class for forecasters that use sliding windows.
class_docstr_tok: ["Base","class","for","forecasters","that","use","sliding","windows","."]
docstr: Predict core logic.
docstr_tok: ["Predict","core","logic","."]
code: def _predict(self, fh, X):
      """Predict core logic."""
      kwargs = {"X": X}
  
      y_pred = self._predict_boilerplate(fh, **kwargs)
  
      # ensure pd.Series name attribute is preserved
      if isinstance(y_pred, pd.Series) and isinstance(
          self._y, pd.Series
      ):
          y_pred.name = self._y.name
      if isinstance(y_pred, pd.DataFrame) and isinstance(
          self._y, pd.Series
      ):
          y_pred = y_pred.iloc[:, 0]
          y_pred.name = self._y.name
  
      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 3 for calling the _BaseWindowForecaster obj's underlying member method code with example usage: obj._predict(fh, X) and returns: y_pred