class_docstr: Forecast time series data with a polynomial trend.
  
  Uses a `sklearn` regressor specified by the `regressor` parameter
  to perform regression on time series values against their corresponding indices,
  after extraction of polynomial features.
  Same as `TrendForecaster` where `regressor` is pipelined with transformation step
  `PolynomialFeatures(degree, with_intercept)` applied to time index, at the start.
  
  In `fit`, for input time series :math:`(v_i, p(t_i)), i = 1, \dots, T`,
  where :math:`v_i` are values, :math:`t_i` are time stamps,
  and :math:`p` is the polynomial feature transform with degree `degree`,
  and with/without intercept depending on `with_intercept`,
  fits an `sklearn` model :math:`v_i = f(p(t_i)) + \epsilon_i`, where `f` is
  the model fitted when `regressor.fit` is passed `X` = vector of :math:`p(t_i)`,
  and `y` = vector of :math:`v_i`.
  
  In `predict`, for a new time point :math:`t_*`, predicts :math:`f(p(t_*))`,
  where :math:`f` is the function as fitted above in `fit`,
  and :math:`p` is the same polynomial feature transform as above.
  
  Default for `regressor` is linear regression = `sklearn` `LinearRegression` default.
  
  If time stamps are `pd.DatetimeIndex`, fitted coefficients are in units
  of days since start of 1970. If time stamps are `pd.PeriodIndex`,
  coefficients are in units of (full) periods since start of 1970.
  
  Parameters
  ----------
  regressor : sklearn regressor estimator object, default = None
      Define the regression model type. If not set, will default to
      sklearn.linear_model.LinearRegression
  degree : int, default = 1
      Degree of polynomial function
  with_intercept : bool, default=True
      If true, then include a feature in which all polynomial powers are
      zero. (i.e. a column of ones, acts as an intercept term in a linear
      model)
  
  Examples
  --------
  >>> from sktime.datasets import load_airline
  >>> from sktime.forecasting.trend import PolynomialTrendForecaster
  >>> y = load_airline()
  >>> forecaster = PolynomialTrendForecaster(degree=1)
  >>> forecaster.fit(y)
  PolynomialTrendForecaster(...)
  >>> y_pred = forecaster.predict(fh=[1,2,3])
class_docstr_tok: ["Forecast","time","series","data","with","a","polynomial","trend",".","Uses","a","`","sklearn","`","regressor","specified","by","the","`","regressor","`","parameter","to","perform","regression","on","time","series","values","against","their","corresponding","indices",",","after","extraction","of","polynomial","features",".","Same","as","`","TrendForecaster","`","where","`","regressor","`","is","pipelined","with","transformation","step","`","PolynomialFeatures","(","degree",",","with_intercept",")","`","applied","to","time","index",",","at","the","start",".","In","`","fit","`",",","for","input","time","series",":","math",":","`","(","v_i",",","p","(","t_i",")",")",",","i","=","1",",","\\dots",",","T","`",",","where",":","math",":","`","v_i","`","are","values",",",":","math",":","`","t_i","`","are","time","stamps",",","and",":","math",":","`","p","`","is","the","polynomial","feature","transform","with","degree","`","degree","`",",","and","with\/without","intercept","depending","on","`","with_intercept","`",",","fits","an","`","sklearn","`","model",":","math",":","`","v_i","=","f","(","p","(","t_i",")",")","+","\\epsilon_i","`",",","where","`","f","`","is","the","model","fitted","when","`","regressor.fit","`","is","passed","`","X","`","=","vector","of",":","math",":","`","p","(","t_i",")","`",",","and","`","y","`","=","vector","of",":","math",":","`","v_i","`",".","In","`","predict","`",",","for","a","new","time","point",":","math",":","`","t_","*","`",",","predicts",":","math",":","`","f","(","p","(","t_","*",")",")","`",",","where",":","math",":","`","f","`","is","the","function","as","fitted","above","in","`","fit","`",",","and",":","math",":","`","p","`","is","the","same","polynomial","feature","transform","as","above",".","Default","for","`","regressor","`","is","linear","regression","=","`","sklearn","`","`","LinearRegression","`","default",".","If","time","stamps","are","`","pd.DatetimeIndex","`",",","fitted","coefficients","are","in","units","of","days","since","start","of","1970",".","If","time","stamps","are","`","pd.PeriodIndex","`",",","coefficients","are","in","units","of","(","full",")","periods","since","start","of","1970",".","Parameters","--","--","--","--","--","regressor",":","sklearn","regressor","estimator","object",",","default","=","None","Define","the","regression","model","type",".","If","not","set",",","will","default","to","sklearn.linear_model.LinearRegression","degree",":","int",",","default","=","1","Degree","of","polynomial","function","with_intercept",":","bool",",","default=True","If","true",",","then","include","a","feature","in","which","all","polynomial","powers","are","zero",".","(","i.e",".","a","column","of","ones",",","acts","as","an","intercept","term","in","a","linear","model",")","Examples","--","--","--","--",">",">",">","from","sktime.datasets","import","load_airline",">",">",">","from","sktime.forecasting.trend","import","PolynomialTrendForecaster",">",">",">","y","=","load_airline","(",")",">",">",">","forecaster","=","PolynomialTrendForecaster","(","degree=1",")",">",">",">","forecaster.fit","(","y",")","PolynomialTrendForecaster","(","...",")",">",">",">","y_pred","=","forecaster.predict","(","fh=","[","1,2,3","]",")"]
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, default = {}
      Parameters to create testing instances of the class
      Each dict are parameters to construct an "interesting" test instance, i.e.,
      `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
      `create_test_instance` uses the first (or only) dictionary in `params`
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",",","default","=","{","}","Parameters","to","create","testing","instances","of","the","class","Each","dict","are","parameters","to","construct","an","``","interesting","''","test","instance",",","i.e.",",","`","MyClass","(","*","*","params",")","`","or","`","MyClass","(","*","*","params","[","i","]",")","`","creates","a","valid","test","instance",".","`","create_test_instance","`","uses","the","first","(","or","only",")","dictionary","in","`","params","`"]
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, default = {}
          Parameters to create testing instances of the class
          Each dict are parameters to construct an "interesting" test instance, i.e.,
          `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
          `create_test_instance` uses the first (or only) dictionary in `params`
      """
      from sklearn.ensemble import RandomForestRegressor
  
      params_list = [
          {},
          {
              "regressor": RandomForestRegressor(),
              "degree": 2,
              "with_intercept": False,
          },
      ]
  
      return params_list
  
file_path: sktime/sktime/forecasting/trend/_polynomial_trend_forecaster.py
imports: import pandas
  from sklearn.base import clone
  from sklearn.linear_model import LinearRegression
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import PolynomialFeatures
  from sktime.forecasting.base import BaseForecaster
  from sktime.forecasting.trend._util import _get_X_numpy_int_from_pandas
label_desc: Use image node_id 4 for calling the PolynomialTrendForecaster obj's underlying member method code with example usage: obj.get_test_params(cls, parameter_set) and returns: params_list