class_docstr: Filter a times series using the Hodrick-Prescott filter.
  
  This is a wrapper around the `hpfilter` function from `statsmodels`.
  (see `statsmodels.tsa.filters.hp_filter.hpfilter`).
  
  Parameters
  ----------
  lamb : float
      The Hodrick-Prescott smoothing parameter. A value of 1600 is
      suggested for quarterly data. Ravn and Uhlig suggest using a value
      of 6.25 (1600/4**4) for annual data and 129600 (1600*3**4) for monthly
      data.
  
  Notes
  -----
  The HP filter removes a smooth trend
  ----------
  Hodrick, R.J, and E. C. Prescott. 1980. "Postwar U.S. Business Cycles: An
      Empirical Investigation." `Carnegie Mellon University discussion
      paper no. 451`.
  Ravn, M.O and H. Uhlig. 2002. "Notes On Adjusted the Hodrick-Prescott
      Filter for the Frequency of Observations." `The Review of Economics and
      Statistics`, 84(2), 371-80.
  
  Examples
  --------
  >>> from sktime.transformations.series.hpfilter import HPFilter # doctest: +SKIP
  >>> import pandas as pd # doctest: +SKIP
  >>> import statsmodels.api as sm # doctest: +SKIP
  >>> dta = sm.datasets.macrodata.load_pandas().data # doctest: +SKIP
  >>> index = pd.period_range('1959Q1', '2009Q3', freq='Q') # doctest: +SKIP
  >>> dta.set_index(index, inplace=True) # doctest: +SKIP
  >>> hp = HPFilter(1600) # doctest: +SKIP
  >>> cycles = hp.fit_transform(X=dta[['realinv']]) # doctest: +SKIP
code: def __init__(
      self,
      lamb=1600,
  ):
      self.lamb = lamb
      super().__init__()
  
imports: import pandas
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 1 to create a new HPFilter object from inherited base classes: BaseTransformer with example: obj = HPFilter(lamb)