class_docstr: Base class for interfacing statsmodels forecasting algorithms.
class_docstr_tok: ["Base","class","for","interfacing","statsmodels","forecasting","algorithms","."]
docstr: Fit to training data.
  
  Parameters
  ----------
  y : pd.Series
      Target time series to which to fit the forecaster.
  fh : int, list or np.array, optional (default=None)
      The forecasters horizon with the steps ahead to to predict.
  X : pd.DataFrame, optional (default=None)
      Exogenous variables are ignored
  
  Returns
  -------
  self : returns an instance of self.
docstr_tok: ["Fit","to","training","data",".","Parameters","--","--","--","--","--","y",":","pd.Series","Target","time","series","to","which","to","fit","the","forecaster",".","fh",":","int",",","list","or","np.array",",","optional","(","default=None",")","The","forecasters","horizon","with","the","steps","ahead","to","to","predict",".","X",":","pd.DataFrame",",","optional","(","default=None",")","Exogenous","variables","are","ignored","Returns","--","--","--","-","self",":","returns","an","instance","of","self","."]
code: def _fit(self, y, X, fh):
      """Fit to training data.
  
      Parameters
      ----------
      y : pd.Series
          Target time series to which to fit the forecaster.
      fh : int, list or np.array, optional (default=None)
          The forecasters horizon with the steps ahead to to predict.
      X : pd.DataFrame, optional (default=None)
          Exogenous variables are ignored
  
      Returns
      -------
      self : returns an instance of self.
      """
      # statsmodels does not support the pd.Int64Index as required,
      # so we coerce them here to pd.RangeIndex
      if isinstance(y, pd.Series) and pd.api.types.is_integer_dtype(
          y.index
      ):
          y, X = _coerce_int_to_range_index(y, X)
      self._fit_forecaster(y, X)
      return self
  
file_path: sktime/sktime/forecasting/base/adapters/_statsmodels.py
imports: import inspect
  import numpy
  import pandas
  from sktime.forecasting.base import BaseForecaster
  from sktime.utils.warnings import warn
label_desc: Use image node_id 2 for calling the _StatsModelsAdapter obj's underlying member method code with example usage: obj._fit(y, X, fh) and returns: self