class_docstr: Base class for interfacing StatsForecast.
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
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
      """
      self._forecaster = self._instantiate_model()
      self._forecaster.fit(y.values, X.values if X is not None else X)
  
      return self
  
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 3 for calling the _StatsForecastAdapter obj's underlying member method code with example usage: obj._fit(y, X, fh) and returns: self