class_docstr: Uses different parameters by forecasting horizon element.
  
  When provided with forecasting horizon [f1, f2, ..., fn],
  will fit forecaster with fh=f1 and parameters fh_params[f1] to forecast f1,
  forecaster with fh=f2 and parameters fh_params[f2] to forecast f2, etc.
  
  To use different estimators per horizon, combine ``FhPlexForecaster`` with
  one of ``MultiplexForecaster`` and ``MultiplexTransformer``.
  
  Parameters
  ----------
  forecaster : sktime compatible forecaster
  fh_params : dict, list, callable, or str that eval-defines a callable
      specifies forecaster to use per fh element
      dict: keys = fh elements, values = param dict for forecaster
      list: i-th entry is forecaster param dict for i-th fh element
      callable: maps fh element to forecaster param dict
      str: eval(fh_params) must define a lambda that maps fh element to param dict
      param dict need not be complete, only overrides for ``forecaster`` params
  fh_lookup : str, one of "relative" (default), "absolute", or "as-is"
      specifies fh elements used in dict or callable
      if "relative", fh will be coerced to relative ForecastingHorizon
      if "absolute", fh will be coerced to absolute ForecastingHorizon
      if "as-is", fh will be coerced to ForecastingHorizon (but not relative/absolute)
  fh_contiguous : bool, default=False
      whether fh in inner loops are enforced to be contiguous
      False: forecaster with fh_params[fN] is asked to forecast fN and only fN
      True: forecaster with fh_params[fN] is asked to forecast 1, 2, ..., fN
          and the output is then subset to the forecast of fN
          this is required if the forecaster can only forecast contiguous horizons
      CAUTION: if using grid search inside, then ``True`` will cause the
      tuning metric to be evaluated on horizons 1, 2, ..., fN, not just fN
  
  Attributes
  ----------
  forecasters_ : dict of sktime forecaster
      keys are fh elements (coerced according to ``fh_lookup``)
      entries are clones of ``forecaster`` used for fitting and forecasting
  
  Examples
  --------
  >>> from sktime.datasets import load_airline
  >>> from sktime.forecasting.naive import NaiveForecaster
  >>> from sktime.forecasting.compose import FhPlexForecaster
  
  Simple example - same parameters per fh element
  >>> y = load_airline()
  >>> f = FhPlexForecaster(NaiveForecaster())
  >>> f.fit(y, fh=[1, 2, 3])
  FhPlexForecaster(...)
  >>> f.forecasters_  # get individual fitted forecasters
  {1: NaiveForecaster(), 2: NaiveForecaster(), 3: NaiveForecaster()}
  >>> fitted_params = f.get_fitted_params()  # or via get_fitted_params
  >>> y_pred = f.predict()
  
  Simple example - different parameters per fh element
  >>> y = load_airline()
  >>> fh_params = [{}, {"strategy": "last"}, {"strategy": "mean"}]
  >>> f = FhPlexForecaster(NaiveForecaster(), fh_params=fh_params)
  >>> f.fit(y, fh=[1, 2, 3])
  FhPlexForecaster(...)
  >>> f.forecasters_  # get individual fitted forecasters
  {1: NaiveForecaster(), 2: NaiveForecaster(), 3: NaiveForecaster(strategy='mean')}
  >>> y_pred = f.predict()
class_docstr_tok: ["Uses","different","parameters","by","forecasting","horizon","element",".","When","provided","with","forecasting","horizon","[","f1",",","f2",",","...",",","fn","]",",","will","fit","forecaster","with","fh=f1","and","parameters","fh_params","[","f1","]","to","forecast","f1",",","forecaster","with","fh=f2","and","parameters","fh_params","[","f2","]","to","forecast","f2",",","etc",".","To","use","different","estimators","per","horizon",",","combine","``","FhPlexForecaster","``","with","one","of","``","MultiplexForecaster","``","and","``","MultiplexTransformer","``",".","Parameters","--","--","--","--","--","forecaster",":","sktime","compatible","forecaster","fh_params",":","dict",",","list",",","callable",",","or","str","that","eval-defines","a","callable","specifies","forecaster","to","use","per","fh","element","dict",":","keys","=","fh","elements",",","values","=","param","dict","for","forecaster","list",":","i-th","entry","is","forecaster","param","dict","for","i-th","fh","element","callable",":","maps","fh","element","to","forecaster","param","dict","str",":","eval","(","fh_params",")","must","define","a","lambda","that","maps","fh","element","to","param","dict","param","dict","need","not","be","complete",",","only","overrides","for","``","forecaster","``","params","fh_lookup",":","str",",","one","of","``","relative","''","(","default",")",",","``","absolute","''",",","or","``","as-is","''","specifies","fh","elements","used","in","dict","or","callable","if","``","relative","''",",","fh","will","be","coerced","to","relative","ForecastingHorizon","if","``","absolute","''",",","fh","will","be","coerced","to","absolute","ForecastingHorizon","if","``","as-is","''",",","fh","will","be","coerced","to","ForecastingHorizon","(","but","not","relative\/absolute",")","fh_contiguous",":","bool",",","default=False","whether","fh","in","inner","loops","are","enforced","to","be","contiguous","False",":","forecaster","with","fh_params","[","fN","]","is","asked","to","forecast","fN","and","only","fN","True",":","forecaster","with","fh_params","[","fN","]","is","asked","to","forecast","1",",","2",",","...",",","fN","and","the","output","is","then","subset","to","the","forecast","of","fN","this","is","required","if","the","forecaster","can","only","forecast","contiguous","horizons","CAUTION",":","if","using","grid","search","inside",",","then","``","True","``","will","cause","the","tuning","metric","to","be","evaluated","on","horizons","1",",","2",",","...",",","fN",",","not","just","fN","Attributes","--","--","--","--","--","forecasters_",":","dict","of","sktime","forecaster","keys","are","fh","elements","(","coerced","according","to","``","fh_lookup","``",")","entries","are","clones","of","``","forecaster","``","used","for","fitting","and","forecasting","Examples","--","--","--","--",">",">",">","from","sktime.datasets","import","load_airline",">",">",">","from","sktime.forecasting.naive","import","NaiveForecaster",">",">",">","from","sktime.forecasting.compose","import","FhPlexForecaster","Simple","example","-","same","parameters","per","fh","element",">",">",">","y","=","load_airline","(",")",">",">",">","f","=","FhPlexForecaster","(","NaiveForecaster","(",")",")",">",">",">","f.fit","(","y",",","fh=","[","1",",","2",",","3","]",")","FhPlexForecaster","(","...",")",">",">",">","f.forecasters_","#","get","individual","fitted","forecasters","{","1",":","NaiveForecaster","(",")",",","2",":","NaiveForecaster","(",")",",","3",":","NaiveForecaster","(",")","}",">",">",">","fitted_params","=","f.get_fitted_params","(",")","#","or","via","get_fitted_params",">",">",">","y_pred","=","f.predict","(",")","Simple","example","-","different","parameters","per","fh","element",">",">",">","y","=","load_airline","(",")",">",">",">","fh_params","=","[","{","}",",","{","``","strategy","''",":","``","last","''","}",",","{","``","strategy","''",":","``","mean","''","}","]",">",">",">","f","=","FhPlexForecaster","(","NaiveForecaster","(",")",",","fh_params=fh_params",")",">",">",">","f.fit","(","y",",","fh=","[","1",",","2",",","3","]",")","FhPlexForecaster","(","...",")",">",">",">","f.forecasters_","#","get","individual","fitted","forecasters","{","1",":","NaiveForecaster","(",")",",","2",":","NaiveForecaster","(",")",",","3",":","NaiveForecaster","(","strategy='mean","'",")","}",">",">",">","y_pred","=","f.predict","(",")"]
docstr: Get fitted parameters.
  
  private _get_fitted_params, called from get_fitted_params
  
  State required:
      Requires state to be "fitted".
  
  Returns
  -------
  fitted_params : dict with str keys
      fitted parameters, keyed by names of fitted parameter
docstr_tok: ["Get","fitted","parameters",".","private","_get_fitted_params",",","called","from","get_fitted_params","State","required",":","Requires","state","to","be","``","fitted","''",".","Returns","--","--","--","-","fitted_params",":","dict","with","str","keys","fitted","parameters",",","keyed","by","names","of","fitted","parameter"]
code: def _get_fitted_params(self):
      """Get fitted parameters.
  
      private _get_fitted_params, called from get_fitted_params
  
      State required:
          Requires state to be "fitted".
  
      Returns
      -------
      fitted_params : dict with str keys
          fitted parameters, keyed by names of fitted parameter
      """
      fh_keys = self.forecasters_.keys()
  
      fitted_params = {}
      for fh_key in fh_keys:
          fh_key_params = self.forecasters_[fh_key].get_fitted_params(
              deep=True
          )
          for k in fh_key_params:
              fitted_params[f"{fh_key}__{k}"] = fh_key_params[k]
  
      return fitted_params
  
file_path: sktime/sktime/forecasting/compose/_fhplex.py
imports: from sktime.forecasting.base import BaseForecaster
  import pandas
  from sktime.datatypes._utilities import get_slice
label_desc: Use image node_id 13 for calling the FhPlexForecaster obj's underlying member method code with example usage: obj._get_fitted_params() and returns: fitted_params