class_docstr: Score periodicities by their spectral power.
  
  Interfacing `seasonal.periodogram` to determine candidate seasonality parameters.
  
  Parameters
  ----------
  min_period : int
      Disregard periods shorter than this number of samples.
      Defaults to 4
  max_period : int
      Disregard periods longer than this number of samples.
      Defaults to None
  thresh : float (0..1)
      Retain periods scoring above thresh*maxscore. Defaults to 0.10
  
  Attributes
  ----------
  sp_ : int, seasonality period with highest power, if any sub-threshold, else 1
  sp_significant_ : list of int, array of Fourier periods in descending order
      of their powers.
  
  Examples
  --------
  >>> from sktime.datasets import load_airline
  >>> from sktime.param_est.seasonality import SeasonalityPeriodogram
  >>> X = load_airline().diff()[1:]  # doctest: +SKIP
  >>> sp_est = SeasonalityPeriodogram()  # doctest: +SKIP
  >>> sp_est.fit(X)  # doctest: +SKIP
  SeasonalityPeriodogram(...)
  >>> sp_est.get_fitted_params()["sp"]  # doctest: +SKIP
  6
  >>> sp_est.get_fitted_params()["sp_significant"]  # doctest: +SKIP
  array([6, 12, 14, 4, 10, 5])
class_docstr_tok: ["Score","periodicities","by","their","spectral","power",".","Interfacing","`","seasonal.periodogram","`","to","determine","candidate","seasonality","parameters",".","Parameters","--","--","--","--","--","min_period",":","int","Disregard","periods","shorter","than","this","number","of","samples",".","Defaults","to","4","max_period",":","int","Disregard","periods","longer","than","this","number","of","samples",".","Defaults","to","None","thresh",":","float","(","0","..","1",")","Retain","periods","scoring","above","thresh","*","maxscore",".","Defaults","to","0.10","Attributes","--","--","--","--","--","sp_",":","int",",","seasonality","period","with","highest","power",",","if","any","sub-threshold",",","else","1","sp_significant_",":","list","of","int",",","array","of","Fourier","periods","in","descending","order","of","their","powers",".","Examples","--","--","--","--",">",">",">","from","sktime.datasets","import","load_airline",">",">",">","from","sktime.param_est.seasonality","import","SeasonalityPeriodogram",">",">",">","X","=","load_airline","(",")",".diff","(",")","[","1",":","]","#","doctest",":","+SKIP",">",">",">","sp_est","=","SeasonalityPeriodogram","(",")","#","doctest",":","+SKIP",">",">",">","sp_est.fit","(","X",")","#","doctest",":","+SKIP","SeasonalityPeriodogram","(","...",")",">",">",">","sp_est.get_fitted_params","(",")","[","``","sp","''","]","#","doctest",":","+SKIP","6",">",">",">","sp_est.get_fitted_params","(",")","[","``","sp_significant","''","]","#","doctest",":","+SKIP","array","(","[","6",",","12",",","14",",","4",",","10",",","5","]",")"]
docstr: Fit estimator and estimate parameters.
  
  private _fit containing the core logic, called from fit
  
  Writes to self:
      Sets fitted model attributes ending in "_".
  
  Parameters
  ----------
  X : guaranteed to be of a type in self.get_tag("X_inner_mtype")
      Time series to which to fit the estimator.
  
  Returns
  -------
  self : reference to self
docstr_tok: ["Fit","estimator","and","estimate","parameters",".","private","_fit","containing","the","core","logic",",","called","from","fit","Writes","to","self",":","Sets","fitted","model","attributes","ending","in","``","_","''",".","Parameters","--","--","--","--","--","X",":","guaranteed","to","be","of","a","type","in","self.get_tag","(","``","X_inner_mtype","''",")","Time","series","to","which","to","fit","the","estimator",".","Returns","--","--","--","-","self",":","reference","to","self"]
code: def _fit(self, X):
      """Fit estimator and estimate parameters.
  
      private _fit containing the core logic, called from fit
  
      Writes to self:
          Sets fitted model attributes ending in "_".
  
      Parameters
      ----------
      X : guaranteed to be of a type in self.get_tag("X_inner_mtype")
          Time series to which to fit the estimator.
  
      Returns
      -------
      self : reference to self
      """
      from seasonal.periodogram import periodogram_peaks
  
      seasons = periodogram_peaks(
          X,
          min_period=self.min_period,
          max_period=self.max_period,
          thresh=self.thresh,
      )
  
      seasons = [x[0] for x in seasons]
  
      if seasons is None or len(seasons) == 0:
          self.sp_ = 1
          self.sp_significant_ = []
      else:
          self.sp_significant_ = seasons
          self.sp_ = self.sp_significant_[0]
  
      return self
  
file_path: sktime/sktime/param_est/seasonality.py
imports: import numpy
  from sktime.param_est.base import BaseParamFitter
label_desc: Use image node_id 2 for calling the SeasonalityPeriodogram obj's underlying member method code with example usage: obj._fit(X) and returns: self