class_docstr: Inherits time series methods from TSM parent class.
  
  **** NEURAL NETWORK AUTOREGRESSIVE (NNAR) MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.ndarray
      Field to specify the univariate time series data that will be used.
  
  ar : int
      Field to specify how many AR lags the model will have.
  
  units : int
      How many units for the neural network
  
  layers : int
      How many layers for the neural networ
  
  activation : function
      E.g. np.tanh, np.array (linear)
  
  family: family object
      E.g. pf.Normal()
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","parent","class",".","*","*","*","*","NEURAL","NETWORK","AUTOREGRESSIVE","(","NNAR",")","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","or","np.ndarray","Field","to","specify","the","univariate","time","series","data","that","will","be","used",".","ar",":","int","Field","to","specify","how","many","AR","lags","the","model","will","have",".","units",":","int","How","many","units","for","the","neural","network","layers",":","int","How","many","layers","for","the","neural","networ","activation",":","function","E.g",".","np.tanh",",","np.array","(","linear",")","family",":","family","object","E.g",".","pf.Normal","(",")"]
docstr: Plots forecasts 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 prediction intervals for the forecast?
  
  Returns
  ----------
  - Plot of the forecast
docstr_tok: ["Plots","forecasts","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","prediction","intervals","for","the","forecast","?","Returns","--","--","--","--","--","-","Plot","of","the","forecast"]
code: def plot_predict(self, h=5, past_values=20, intervals=True, **kwargs):
      """Plots forecasts 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 prediction intervals for the forecast?
  
      Returns
      ----------
      - Plot of the forecast
      """
  
      figsize = kwargs.get("figsize", (10, 7))
  
      if self.latent_variables.estimated is False:
          raise Exception("No latent variables estimated!")
      else:
          import matplotlib.pyplot as plt
          import seaborn as sns
  
          # Retrieve data, dates and (transformed) latent variables
          mu, Y = self._model(self.latent_variables.get_z_values())
          date_index = self.shift_dates(h)
          t_z = self.transform_z()
  
          # Get mean prediction and simulations (for errors)
          mean_values = self._mean_prediction(mu, Y, h, t_z)
          if intervals is True:
              sim_values = self._sim_prediction(mu, Y, h, t_z, 15000)
          else:
              sim_values = self._sim_prediction(mu, Y, h, t_z, 2)
          (
              error_bars,
              forecasted_values,
              plot_values,
              plot_index,
          ) = self._summarize_simulations(
              mean_values, sim_values, date_index, h, past_values
          )
  
          plt.figure(figsize=figsize)
          if intervals is True:
              alpha = [0.15 * i / float(100) for i in range(50, 12, -2)]
              for count, pre in enumerate(error_bars):
                  plt.fill_between(
                      date_index[-h - 1 :],
                      forecasted_values - pre,
                      forecasted_values + pre,
                      alpha=alpha[count],
                  )
          plt.plot(plot_index, plot_values)
          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 patsy import dmatrices, dmatrix, demo_data
  from ..None import families
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import data_check
  from .nn_architecture import neural_network_tanh, neural_network_tanh_mb
label_desc: Use image node_id 16 for calling the NNARX obj's underlying member method code with example usage: obj.plot_predict(h, past_values, intervals) without return types