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
docstr: Transform X and return a transformed version.
  
  private _transform containing core logic, called from transform
  
  Parameters
  ----------
  X : array_like, A 1d array
  
  Returns
  -------
  transformed cyclical version of X
docstr_tok: ["Transform","X","and","return","a","transformed","version",".","private","_transform","containing","core","logic",",","called","from","transform","Parameters","--","--","--","--","--","X",":","array_like",",","A","1d","array","Returns","--","--","--","-","transformed","cyclical","version","of","X"]
code: def _transform(self, X, y=None):
      """Transform X and return a transformed version.
  
      private _transform containing core logic, called from transform
  
      Parameters
      ----------
      X : array_like, A 1d array
  
      Returns
      -------
      transformed cyclical version of X
      """
      from statsmodels.tsa.filters.hp_filter import hpfilter
  
      kwargs = {"lamb": self.lamb}
      return hpfilter(X, **kwargs)[0]
  
imports: import pandas
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling the HPFilter obj's underlying member method code with example usage: obj._transform(X, y) and returns: hpfilter