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: Return testing parameter settings for the estimator.
  
  Parameters
  ----------
  parameter_set : str, default="default"
      Name of the set of test parameters to return, for use in tests. If no
      special parameters are defined for a value, will return `"default"` set.
  
  Returns
  -------
  params : dict or list of dict
docstr_tok: ["Return","testing","parameter","settings","for","the","estimator",".","Parameters","--","--","--","--","--","parameter_set",":","str",",","default=","''","default","''","Name","of","the","set","of","test","parameters","to","return",",","for","use","in","tests",".","If","no","special","parameters","are","defined","for","a","value",",","will","return","`","``","default","''","`","set",".","Returns","--","--","--","-","params",":","dict","or","list","of","dict"]
code: def get_test_params(cls, parameter_set="default"):
      """Return testing parameter settings for the estimator.
  
      Parameters
      ----------
      parameter_set : str, default="default"
          Name of the set of test parameters to return, for use in tests. If no
          special parameters are defined for a value, will return `"default"` set.
  
      Returns
      -------
      params : dict or list of dict
      """
      from sktime.forecasting.naive import NaiveForecaster
  
      # mean and drift are inefficient, for now use last only
      # naive_m = ["last", "mean", "drift"]
  
      naive_m = ["last", "last", "last"]
      naive_list = [{"strategy": x} for x in naive_m * 20]
      naive_dict = {k: naive_list[k % 3] for k in range(-50, 10)}
  
      naive_str = (
          "lambda ix: {'strategy': ['last', 'last', 'last'][ix % 3]}"
      )
  
      f = NaiveForecaster()
  
      params1 = {"forecaster": f, "fh_params": naive_list}
      params2 = {
          "forecaster": f,
          "fh_params": naive_dict,
          "fh_lookup": "relative",
          "fh_contiguous": True,
      }
      params3 = {
          "forecaster": f,
          "fh_params": naive_str,
          "fh_lookup": "relative",
      }
  
      return [params1, params2, params3]
  
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 14 for calling the FhPlexForecaster obj's underlying member method code with example usage: obj.get_test_params(cls, parameter_set) and returns: list