class_docstr: Inherits time series methods from TSM class.
  
  **** NON-GAUSSIAN LOCAL LEVEL MODEL ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.array
      Field to specify the time series data that will be used.
  
  integ : int (default : 0)
      Specifies how many times to difference the time series.
  
  target : str (pd.DataFrame) or int (np.array)
      Specifies which column name or array index to use. By default, first
      column/array will be selected as the dependent variable.
  
  family : 
      e.g. pf.Normal(0,1)
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","NON-GAUSSIAN","LOCAL","LEVEL","MODEL","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","or","np.array","Field","to","specify","the","time","series","data","that","will","be","used",".","integ",":","int","(","default",":","0",")","Specifies","how","many","times","to","difference","the","time","series",".","target",":","str","(","pd.DataFrame",")","or","int","(","np.array",")","Specifies","which","column","name","or","array","index","to","use",".","By","default",",","first","column\/array","will","be","selected","as","the","dependent","variable",".","family",":","e.g",".","pf.Normal","(","0,1",")"]
docstr: Makes forecast with the estimated model
  
  Parameters
  ----------
  h : int (default : 5)
      How many steps ahead would you like to forecast?
  
  past_values : int (default : 20)
      How many past observations to show on the forecast graph?
  
  intervals : Boolean
      Would you like to show 95% prediction intervals for the forecast?
  
  Returns
  ----------
  - Plot of the forecast
docstr_tok: ["Makes","forecast","with","the","estimated","model","Parameters","--","--","--","--","--","h",":","int","(","default",":","5",")","How","many","steps","ahead","would","you","like","to","forecast","?","past_values",":","int","(","default",":","20",")","How","many","past","observations","to","show","on","the","forecast","graph","?","intervals",":","Boolean","Would","you","like","to","show","95","%","prediction","intervals","for","the","forecast","?","Returns","--","--","--","--","--","-","Plot","of","the","forecast"]
code: def plot_predict(self, h=5, past_values=20, intervals=True, **kwargs):
      """Makes forecast with the estimated model
  
      Parameters
      ----------
      h : int (default : 5)
          How many steps ahead would you like to forecast?
  
      past_values : int (default : 20)
          How many past observations to show on the forecast graph?
  
      intervals : Boolean
          Would you like to show 95% prediction intervals for the forecast?
  
      Returns
      ----------
      - Plot of the forecast
      """
      import matplotlib.pyplot as plt
      import seaborn as sns
  
      figsize = kwargs.get("figsize", (10, 7))
  
      if self.latent_variables.estimated is False:
          raise Exception("No latent variables estimated!")
      else:
          # Retrieve data, dates and (transformed) latent variables
          scale, shape, skewness = self._get_scale_and_shape(
              self.latent_variables.get_z_values(transformed=True)
          )
          previous_value = self.data[-1]
          forecasted_values = np.ones(h) * self.states[-1]
          date_index = self.shift_dates(h)
          simulations = 10000
          sim_vector = np.zeros([simulations, h])
          t_params = self.transform_z()
  
          for n in range(0, simulations):
              rnd_q = np.random.normal(
                  0,
                  np.sqrt(
                      self.latent_variables.get_z_values(
                          transformed=True
                      )[0]
                  ),
                  h,
              )
              exp = forecasted_values.copy()
  
              for t in range(0, h):
                  if t == 0:
                      exp[t] = forecasted_values[t] + rnd_q[t]
                  else:
                      exp[t] = exp[t - 1] + rnd_q[t]
  
              sim_vector[n] = self.family.draw_variable(
                  loc=self.link(exp),
                  shape=shape,
                  scale=scale,
                  skewness=skewness,
                  nsims=exp.shape[0],
              )
  
          sim_vector = np.transpose(sim_vector)
  
          forecasted_values = self.link(forecasted_values)
  
          if self.model_name2 == "Skewt":
              forecasted_values = forecasted_values + (
                  (t_params[-3] - (1.0 / t_params[-3]))
                  * t_params[-2]
                  * gas.SkewtScore.tv_variate_exp(t_params[-1])
              )
  
          plt.figure(figsize=figsize)
  
          if intervals == True:
              plt.fill_between(
                  date_index[-h - 1 :],
                  np.insert(
                      [np.percentile(i, 5) for i in sim_vector],
                      0,
                      previous_value,
                  ),
                  np.insert(
                      [np.percentile(i, 95) for i in sim_vector],
                      0,
                      previous_value,
                  ),
                  alpha=0.2,
                  label="95 C.I.",
              )
  
          plot_values = np.append(
              self.data[-past_values:], forecasted_values
          )
          plot_index = date_index[-h - past_values :]
  
          plt.plot(plot_index, plot_values, label=self.data_name)
          plt.title("Forecast for " + self.data_name)
          plt.xlabel("Time")
          plt.ylabel(self.data_name)
          plt.show()
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  from scipy import optimize
  from ..None import inference
  from ..None import families
  from ..None import output
  from ..None import tsm
  from ..None import data_check
  from ..None import covariances
  from ..None import results
  from ..None import gas
  from .kalman import *
  from .llm import *
label_desc: Use image node_id 20 for calling the NLLEV obj's underlying member method code with example usage: obj.plot_predict(h, past_values, intervals) without return types