class_docstr: Results class from estimated Theta Models.
  
  Parameters
  ----------
  b0 : float
      The estimated trend slope.
  alpha : float
      The estimated SES parameter.
  sigma2 : float
      The estimated residual variance from the SES/IMA model.
  one_step : float
      The one-step forecast from the SES.
  seasonal : ndarray
      An array of estimated seasonal terms.
  use_mle : bool
      A flag indicating that the parameters were estimated using MLE.
  model : ThetaModel
      The model used to produce the results.
class_docstr_tok: ["Results","class","from","estimated","Theta","Models",".","Parameters","--","--","--","--","--","b0",":","float","The","estimated","trend","slope",".","alpha",":","float","The","estimated","SES","parameter",".","sigma2",":","float","The","estimated","residual","variance","from","the","SES\/IMA","model",".","one_step",":","float","The","one-step","forecast","from","the","SES",".","seasonal",":","ndarray","An","array","of","estimated","seasonal","terms",".","use_mle",":","bool","A","flag","indicating","that","the","parameters","were","estimated","using","MLE",".","model",":","ThetaModel","The","model","used","to","produce","the","results","."]
docstr: Compute the three components of the Theta model forecast
  
  Parameters
  ----------
  steps : int
      The number of steps ahead to compute the forecast components.
  
  Returns
  -------
  DataFrame
      A DataFrame with three columns: trend, ses and seasonal containing
      the forecast values of each of the three components.
  
  Notes
  -----
  For a given value of :math:`\theta`, the deseasonalized forecast is
  `fcast = w * trend + ses` where :math:`w = \frac{theta - 1}{theta}`.
  The reseasonalized forecasts are then `seasonal * fcast` if the
  seasonality is multiplicative or `seasonal + fcast` if the seasonality
  is additive.
docstr_tok: ["Compute","the","three","components","of","the","Theta","model","forecast","Parameters","--","--","--","--","--","steps",":","int","The","number","of","steps","ahead","to","compute","the","forecast","components",".","Returns","--","--","--","-","DataFrame","A","DataFrame","with","three","columns",":","trend",",","ses","and","seasonal","containing","the","forecast","values","of","each","of","the","three","components",".","Notes","--","--","-","For","a","given","value","of",":","math",":","`","\\theta","`",",","the","deseasonalized","forecast","is","`","fcast","=","w","*","trend","+","ses","`","where",":","math",":","`","w","=","\\frac","{","theta","-","1","}","{","theta","}","`",".","The","reseasonalized","forecasts","are","then","`","seasonal","*","fcast","`","if","the","seasonality","is","multiplicative","or","`","seasonal","+","fcast","`","if","the","seasonality","is","additive","."]
code: def forecast_components(self, steps: int = 1) -> pd.DataFrame:
      r"""
      Compute the three components of the Theta model forecast
  
      Parameters
      ----------
      steps : int
          The number of steps ahead to compute the forecast components.
  
      Returns
      -------
      DataFrame
          A DataFrame with three columns: trend, ses and seasonal containing
          the forecast values of each of the three components.
  
      Notes
      -----
      For a given value of :math:`\theta`, the deseasonalized forecast is
      `fcast = w * trend + ses` where :math:`w = \frac{theta - 1}{theta}`.
      The reseasonalized forecasts are then `seasonal * fcast` if the
      seasonality is multiplicative or `seasonal + fcast` if the seasonality
      is additive.
      """
      steps = int_like(steps, "steps")
      if steps < 1:
          raise ValueError("steps must be a positive integer")
      alpha = self._alpha
      b0 = self._b0
      nobs = self._nobs
      h = np.arange(1, steps + 1, dtype=np.float64) - 1
      if alpha > 0:
          h += 1 / alpha - ((1 - alpha) ** nobs / alpha)
      trend = b0 * h
      ses = self._one_step * np.ones(steps)
      if self.model.method.startswith("add"):
          season = np.zeros(steps)
      else:
          season = np.ones(steps)
      # Re-seasonalize
      if self.model.deseasonalize:
          seasonal = self._seasonal
          period = self.model.period
          oos_idx = nobs + np.arange(steps)
          seasonal_locs = oos_idx % period
          if seasonal.shape[0]:
              season[:] = seasonal[seasonal_locs]
      index = getattr(self.model.endog_orig, "index", None)
      if index is None:
          index = pd.RangeIndex(0, self.model.endog_orig.shape[0])
      index = extend_index(steps, index)
  
      df = pd.DataFrame(
          {"trend": trend, "ses": ses, "seasonal": season}, index=index
      )
      return df
  
imports: from typing import TYPE_CHECKING, Optional
  import numpy
  import pandas
  from scipy import stats
  from statsmodels.iolib.summary import Summary
  from statsmodels.iolib.table import SimpleTable
  from statsmodels.tools.validation import array_like, bool_like, float_like, int_like, string_like
  from statsmodels.tsa.deterministic import DeterministicTerm
  from statsmodels.tsa.seasonal import seasonal_decompose
  from statsmodels.tsa.statespace.exponential_smoothing import ExponentialSmoothing
  from statsmodels.tsa.statespace.sarimax import SARIMAX
  from statsmodels.tsa.stattools import acf
  from statsmodels.tsa.tsatools import add_trend, freq_to_period
label_desc: Use image node_id 6 for calling the ThetaModelResults obj's underlying member method code with example usage: obj.forecast_components(steps) and returns: df