class_docstr: Base class for interfacing StatsForecast.
docstr: Forecast time series at future horizon.
  
  private _predict containing the core logic, called from predict
  
  State required:
      Requires state to be "fitted".
  
  Accesses in self:
      Fitted model attributes ending in "_"
      self.cutoff
  
  Parameters
  ----------
  fh : guaranteed to be ForecastingHorizon or None, optional (default=None)
      The forecasting horizon with the steps ahead to to predict.
      If not passed in _fit, guaranteed to be passed here
  X : pd.DataFrame, optional (default=None)
      Exogenous time series
  
  Returns
  -------
  y_pred : pd.Series
      Point predictions
code: def _predict(self, fh, X):
      """Forecast time series at future horizon.
  
      private _predict containing the core logic, called from predict
  
      State required:
          Requires state to be "fitted".
  
      Accesses in self:
          Fitted model attributes ending in "_"
          self.cutoff
  
      Parameters
      ----------
      fh : guaranteed to be ForecastingHorizon or None, optional (default=None)
          The forecasting horizon with the steps ahead to to predict.
          If not passed in _fit, guaranteed to be passed here
      X : pd.DataFrame, optional (default=None)
          Exogenous time series
  
      Returns
      -------
      y_pred : pd.Series
          Point predictions
      """
      # distinguish between in-sample and out-of-sample prediction
      fh_oos = fh.to_out_of_sample(self.cutoff)
      fh_ins = fh.to_in_sample(self.cutoff)
  
      # all values are out-of-sample
      if fh.is_all_out_of_sample(self.cutoff):
          y_pred = self._predict_fixed_cutoff(fh_oos, X=X)
  
      # all values are in-sample
      elif fh.is_all_in_sample(self.cutoff):
          y_pred = self._predict_in_sample(fh_ins, X=X)
  
      # both in-sample and out-of-sample values
      else:
          y_ins = self._predict_in_sample(fh_ins, X=X)
          y_oos = self._predict_fixed_cutoff(fh_oos, X=X)
          y_pred = pd.concat([y_ins, y_oos])
  
      # ensure that name is not added nor removed
      # otherwise this may upset conversion to pd.DataFrame
      y_pred.name = self._y.name
      return y_pred
  
file_path: sktime/sktime/forecasting/base/adapters/_statsforecast.py
imports: import pandas
  from sktime.forecasting.base import BaseForecaster
  from sktime.forecasting.base._base import DEFAULT_ALPHA
label_desc: Use image node_id 4 for calling the _StatsForecastAdapter obj's underlying member method code with example usage: obj._predict(fh, X) and returns: y_pred