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: Plot forecasts, prediction intervals and in-sample values
  
  Parameters
  ----------
  steps : int, default 1
      The number of steps ahead to compute the forecast components.
  theta : float, default 2
      The theta value to use when computing the weight to combine
      the trend and the SES forecasts.
  alpha : {float, None}, default 0.05
      The tail probability not covered by the confidence interval. Must
      be in (0, 1). Confidence interval is constructed assuming normally
      distributed shocks. If None, figure will not show the confidence
      interval.
  in_sample : bool, default False
      Flag indicating whether to include the in-sample period in the
      plot.
  fig : Figure, default None
      An existing figure handle. If not provided, a new figure is
      created.
  figsize: tuple[float, float], default None
      Tuple containing the figure size.
  
  Returns
  -------
  Figure
      Figure handle containing the plot.
  
  Notes
  -----
  The variance of the h-step forecast is assumed to follow from the
  integrated Moving Average structure of the Theta model, and so is
  :math:`\sigma^2(\alpha^2 + (h-1))`. The prediction interval assumes
  that innovations are normally distributed.
docstr_tok: ["Plot","forecasts",",","prediction","intervals","and","in-sample","values","Parameters","--","--","--","--","--","steps",":","int",",","default","1","The","number","of","steps","ahead","to","compute","the","forecast","components",".","theta",":","float",",","default","2","The","theta","value","to","use","when","computing","the","weight","to","combine","the","trend","and","the","SES","forecasts",".","alpha",":","{","float",",","None","}",",","default","0.05","The","tail","probability","not","covered","by","the","confidence","interval",".","Must","be","in","(","0",",","1",")",".","Confidence","interval","is","constructed","assuming","normally","distributed","shocks",".","If","None",",","figure","will","not","show","the","confidence","interval",".","in_sample",":","bool",",","default","False","Flag","indicating","whether","to","include","the","in-sample","period","in","the","plot",".","fig",":","Figure",",","default","None","An","existing","figure","handle",".","If","not","provided",",","a","new","figure","is","created",".","figsize",":","tuple","[","float",",","float","]",",","default","None","Tuple","containing","the","figure","size",".","Returns","--","--","--","-","Figure","Figure","handle","containing","the","plot",".","Notes","--","--","-","The","variance","of","the","h-step","forecast","is","assumed","to","follow","from","the","integrated","Moving","Average","structure","of","the","Theta","model",",","and","so","is",":","math",":","`","\\sigma^2","(","\\alpha^2","+","(","h-1",")",")","`",".","The","prediction","interval","assumes","that","innovations","are","normally","distributed","."]
code: def plot_predict(
      self,
      steps: int = 1,
      theta: float = 2,
      alpha: Optional[float] = 0.05,
      in_sample: bool = False,
      fig: Optional["matplotlib.figure.Figure"] = None,
      figsize: tuple[float, float] = None,
  ) -> "matplotlib.figure.Figure":
      r"""
      Plot forecasts, prediction intervals and in-sample values
  
      Parameters
      ----------
      steps : int, default 1
          The number of steps ahead to compute the forecast components.
      theta : float, default 2
          The theta value to use when computing the weight to combine
          the trend and the SES forecasts.
      alpha : {float, None}, default 0.05
          The tail probability not covered by the confidence interval. Must
          be in (0, 1). Confidence interval is constructed assuming normally
          distributed shocks. If None, figure will not show the confidence
          interval.
      in_sample : bool, default False
          Flag indicating whether to include the in-sample period in the
          plot.
      fig : Figure, default None
          An existing figure handle. If not provided, a new figure is
          created.
      figsize: tuple[float, float], default None
          Tuple containing the figure size.
  
      Returns
      -------
      Figure
          Figure handle containing the plot.
  
      Notes
      -----
      The variance of the h-step forecast is assumed to follow from the
      integrated Moving Average structure of the Theta model, and so is
      :math:`\sigma^2(\alpha^2 + (h-1))`. The prediction interval assumes
      that innovations are normally distributed.
      """
      from statsmodels.graphics.utils import _import_mpl, create_mpl_fig
  
      _import_mpl()
      fig = create_mpl_fig(fig, figsize)
      assert fig is not None
      predictions = self.forecast(steps, theta)
      pred_index = predictions.index
  
      ax = fig.add_subplot(111)
      nobs = self.model.endog_orig.shape[0]
      index = pd.Index(np.arange(nobs))
      if in_sample:
          if isinstance(self.model.endog_orig, pd.Series):
              index = self.model.endog_orig.index
          ax.plot(index, self.model.endog_orig)
      ax.plot(pred_index, predictions)
      if alpha is not None:
          pi = self.prediction_intervals(steps, theta, alpha)
          label = f"{1 - alpha:.0%} confidence interval"
          ax.fill_between(
              pred_index,
              pi["lower"],
              pi["upper"],
              color="gray",
              alpha=0.5,
              label=label,
          )
  
      ax.legend(loc="best", frameon=False)
      fig.tight_layout(pad=1.0)
  
      return fig
  
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 9 for calling the ThetaModelResults obj's underlying member method code with example usage: obj.plot_predict(steps, theta, alpha, in_sample, fig, figsize) and returns: fig