class_docstr: Class to hold results from fitting an unobserved components model.
  
  Parameters
  ----------
  model : UnobservedComponents instance
      The fitted model instance
  
  Attributes
  ----------
  specification : dictionary
      Dictionary including all attributes from the unobserved components
      model instance.
  
  See Also
  --------
  statsmodels.tsa.statespace.kalman_filter.FilterResults
  statsmodels.tsa.statespace.mlemodel.MLEResults
class_docstr_tok: ["Class","to","hold","results","from","fitting","an","unobserved","components","model",".","Parameters","--","--","--","--","--","model",":","UnobservedComponents","instance","The","fitted","model","instance","Attributes","--","--","--","--","--","specification",":","dictionary","Dictionary","including","all","attributes","from","the","unobserved","components","model","instance",".","See","Also","--","--","--","--","statsmodels.tsa.statespace.kalman_filter.FilterResults","statsmodels.tsa.statespace.mlemodel.MLEResults"]
docstr: Estimates of unobserved frequency domain seasonal component(s)
  
  Returns
  -------
  out: list of Bunch instances
      Each item has the following attributes:
  
      - `filtered`: a time series array with the filtered estimate of
                    the component
      - `filtered_cov`: a time series array with the filtered estimate of
                    the variance/covariance of the component
      - `smoothed`: a time series array with the smoothed estimate of
                    the component
      - `smoothed_cov`: a time series array with the smoothed estimate of
                    the variance/covariance of the component
      - `offset`: an integer giving the offset in the state vector where
                  this component begins
docstr_tok: ["Estimates","of","unobserved","frequency","domain","seasonal","component","(","s",")","Returns","--","--","--","-","out",":","list","of","Bunch","instances","Each","item","has","the","following","attributes",":","-","`","filtered","`",":","a","time","series","array","with","the","filtered","estimate","of","the","component","-","`","filtered_cov","`",":","a","time","series","array","with","the","filtered","estimate","of","the","variance\/covariance","of","the","component","-","`","smoothed","`",":","a","time","series","array","with","the","smoothed","estimate","of","the","component","-","`","smoothed_cov","`",":","a","time","series","array","with","the","smoothed","estimate","of","the","variance\/covariance","of","the","component","-","`","offset","`",":","an","integer","giving","the","offset","in","the","state","vector","where","this","component","begins"]
code: def freq_seasonal(self):
      """
      Estimates of unobserved frequency domain seasonal component(s)
  
      Returns
      -------
      out: list of Bunch instances
          Each item has the following attributes:
  
          - `filtered`: a time series array with the filtered estimate of
                        the component
          - `filtered_cov`: a time series array with the filtered estimate of
                        the variance/covariance of the component
          - `smoothed`: a time series array with the smoothed estimate of
                        the component
          - `smoothed_cov`: a time series array with the smoothed estimate of
                        the variance/covariance of the component
          - `offset`: an integer giving the offset in the state vector where
                      this component begins
      """
      # If present, freq_seasonal components always follows level/trend
      #  and seasonal.
  
      # There are 2 * (harmonics) seasonal states per freq_seasonal
      # component.
      # The sum of every other state enters the measurement equation.
      # Additionally, there can be multiple components of this type.
      # These facts make this property messier in implementation than the
      # others.
      # Fortunately, the states are conditionally mutually independent
      # (conditional on previous timestep's states), so that the calculations
      # of the variances are simple summations of individual variances and
      # the calculation of the returned state is likewise a summation.
      out = []
      spec = self.specification
      if spec.freq_seasonal:
          previous_states_offset = int(
              spec.trend
              + spec.level
              + self._k_states_by_type["seasonal"]
          )
          previous_f_seas_offset = 0
          for ix, h in enumerate(spec.freq_seasonal_harmonics):
              offset = previous_states_offset + previous_f_seas_offset
  
              period = spec.freq_seasonal_periods[ix]
  
              # Only the gamma_jt terms enter the measurement equation (cf.
              # D&K 2012 (3.7))
              states_in_sum = np.arange(0, 2 * h, 2)
  
              filtered_state = np.sum(
                  [
                      self.filtered_state[offset + j]
                      for j in states_in_sum
                  ],
                  axis=0,
              )
              filtered_cov = np.sum(
                  [
                      self.filtered_state_cov[offset + j, offset + j]
                      for j in states_in_sum
                  ],
                  axis=0,
              )
  
              item = Bunch(
                  filtered=filtered_state,
                  filtered_cov=filtered_cov,
                  smoothed=None,
                  smoothed_cov=None,
                  offset=offset,
                  pretty_name="seasonal {p}({h})".format(
                      p=repr(period), h=repr(h)
                  ),
              )
              if self.smoothed_state is not None:
                  item.smoothed = np.sum(
                      [
                          self.smoothed_state[offset + j]
                          for j in states_in_sum
                      ],
                      axis=0,
                  )
              if self.smoothed_state_cov is not None:
                  item.smoothed_cov = np.sum(
                      [
                          self.smoothed_state_cov[
                              offset + j, offset + j
                          ]
                          for j in states_in_sum
                      ],
                      axis=0,
                  )
              out.append(item)
              previous_f_seas_offset += 2 * h
      return out
  
imports: from warnings import warn
  import numpy
  from statsmodels.compat.pandas import Appender
  from statsmodels.tools.tools import Bunch
  from statsmodels.tools.sm_exceptions import OutputWarning, SpecificationWarning
  import statsmodels.base.wrapper
  from statsmodels.tsa.filters.hp_filter import hpfilter
  from statsmodels.tsa.tsatools import lagmat
  from .mlemodel import MLEModel, MLEResults, MLEResultsWrapper
  from .initialization import Initialization
  from .tools import companion_matrix, constrain_stationary_univariate, unconstrain_stationary_univariate, prepare_exog
label_desc: Use image node_id 5 for calling the UnobservedComponentsResults obj's underlying member method code with example usage: obj.freq_seasonal() and returns: out