class_docstr: StatsForecast Back Adapter.
  
  StatsForecastBackAdapter is a wrapper for sktime forecasters to be used in
  StatsForecast composite models.
  
  Parameters
  ----------
  estimator : sktime forecaster
  
  Examples
  --------
  >>> from sktime.datasets import load_airline
  >>> from sktime.forecasting.statsforecast import StatsForecastMSTL
  >>> from sktime.forecasting.ets import AutoETS
  
  >>> y = load_airline()
  >>> trend_forecaster = AutoETS() # doctest: +SKIP
  >>> model = StatsForecastMSTL( # doctest: +SKIP
          season_length=[3,12],
          trend_forecaster=trend_forecaster
      )
  >>> fitted_model = model.fit(y=y) # doctest: +SKIP
  >>> y_pred = fitted_model.predict(fh=[1,2,3]) # doctest: +SKIP
class_docstr_tok: ["StatsForecast","Back","Adapter",".","StatsForecastBackAdapter","is","a","wrapper","for","sktime","forecasters","to","be","used","in","StatsForecast","composite","models",".","Parameters","--","--","--","--","--","estimator",":","sktime","forecaster","Examples","--","--","--","--",">",">",">","from","sktime.datasets","import","load_airline",">",">",">","from","sktime.forecasting.statsforecast","import","StatsForecastMSTL",">",">",">","from","sktime.forecasting.ets","import","AutoETS",">",">",">","y","=","load_airline","(",")",">",">",">","trend_forecaster","=","AutoETS","(",")","#","doctest",":","+SKIP",">",">",">","model","=","StatsForecastMSTL","(","#","doctest",":","+SKIP","season_length=","[","3,12","]",",","trend_forecaster=trend_forecaster",")",">",">",">","fitted_model","=","model.fit","(","y=y",")","#","doctest",":","+SKIP",">",">",">","y_pred","=","fitted_model.predict","(","fh=","[","1,2,3","]",")","#","doctest",":","+SKIP"]
docstr: Access fitted MSTL insample predictions.
  
  Parameters
  ----------
  level : typing.Optional[typing.Tuple[int]]
      Confidence levels (0-100) for prediction intervals.
  
  Returns
  -------
  y_pred : dict
      Dictionary with entries mean for point predictions and level_* for
      probabilistic predictions.
docstr_tok: ["Access","fitted","MSTL","insample","predictions",".","Parameters","--","--","--","--","--","level",":","typing.Optional","[","typing.Tuple","[","int","]","]","Confidence","levels","(","0-100",")","for","prediction","intervals",".","Returns","--","--","--","-","y_pred",":","dict","Dictionary","with","entries","mean","for","point","predictions","and","level_","*","for","probabilistic","predictions","."]
code: def predict_in_sample(self, level=None):
      """Access fitted MSTL insample predictions.
  
      Parameters
      ----------
      level : typing.Optional[typing.Tuple[int]]
          Confidence levels (0-100) for prediction intervals.
  
      Returns
      -------
      y_pred : dict
          Dictionary with entries mean for point predictions and level_* for
          probabilistic predictions.
      """
      fitted = self.estimator.predict(self.estimator._y.index)[:, 0]
  
      if level is None:
          return {"fitted": fitted}
  
      level = sorted(level)
      coverage = [round(_l / 100, 2) for _l in level]
      pred_int = self.estimator.predict_interval(
          fh=self.estimator._y.index,
          X=self.estimator._X,
          coverage=coverage,
      )
      return self.format_pred_int(
          "fitted", fitted, pred_int, coverage, level
      )
  
imports: from inspect import signature
  from typing import Dict
  from warnings import warn
  import pandas
  from sktime.forecasting.base import BaseForecaster
label_desc: Use image node_id 6 for calling the StatsForecastBackAdapter obj's underlying member method code with example usage: obj.predict_in_sample(level) and returns: self, dict