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: Produces simulation forecasted values and prediction intervals
  
  Parameters
  ----------
  mean_values : np.ndarray
      Mean predictions for h-step ahead forecasts
  
  sim_vector : np.ndarray
      N simulated predictions for h-step ahead forecasts
  
  date_index : pd.DateIndex or np.ndarray
      Date index for the simulations
  
  h : int
      How many steps ahead are forecast
  
  past_values : int
      How many past observations to include in the forecast plot
  
  intervals : boolean
      Would you like to show prediction intervals for the forecast?
docstr_tok: ["Produces","simulation","forecasted","values","and","prediction","intervals","Parameters","--","--","--","--","--","mean_values",":","np.ndarray","Mean","predictions","for","h-step","ahead","forecasts","sim_vector",":","np.ndarray","N","simulated","predictions","for","h-step","ahead","forecasts","date_index",":","pd.DateIndex","or","np.ndarray","Date","index","for","the","simulations","h",":","int","How","many","steps","ahead","are","forecast","past_values",":","int","How","many","past","observations","to","include","in","the","forecast","plot","intervals",":","boolean","Would","you","like","to","show","prediction","intervals","for","the","forecast","?"]
code: def _summarize_simulations(
      self, mean_values, sim_vector, date_index, h, past_values
  ):
      """Produces simulation forecasted values and prediction intervals
  
      Parameters
      ----------
      mean_values : np.ndarray
          Mean predictions for h-step ahead forecasts
  
      sim_vector : np.ndarray
          N simulated predictions for h-step ahead forecasts
  
      date_index : pd.DateIndex or np.ndarray
          Date index for the simulations
  
      h : int
          How many steps ahead are forecast
  
      past_values : int
          How many past observations to include in the forecast plot
  
      intervals : boolean
          Would you like to show prediction intervals for the forecast?
      """
  
      error_bars = []
      for pre in range(5, 100, 5):
          error_bars.append(
              np.insert(
                  [np.percentile(i, pre) for i in sim_vector]
                  - mean_values[-h:],
                  0,
                  0,
              )
          )
      forecasted_values = mean_values[-h - 1 :]
      plot_values = mean_values[-h - past_values :]
      plot_index = date_index[-h - past_values :]
      return error_bars, forecasted_values, plot_values, plot_index
  
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 11 for calling the NNARX obj's underlying member method code with example usage: obj._summarize_simulations(mean_values, sim_vector, date_index, h, past_values) and returns: error_bars,  forecasted_values,  plot_values,  plot_index