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: Creates a h-step ahead mean prediction
  
  Parameters
  ----------
  mu : np.ndarray
      The past predicted values
  
  Y : np.ndarray
      The past data
  
  h : int
      How many steps ahead for the prediction
  
  t_z : np.ndarray
      A vector of (transformed) latent variables
  
  Returns
  ----------
  h-length vector of mean predictions
docstr_tok: ["Creates","a","h-step","ahead","mean","prediction","Parameters","--","--","--","--","--","mu",":","np.ndarray","The","past","predicted","values","Y",":","np.ndarray","The","past","data","h",":","int","How","many","steps","ahead","for","the","prediction","t_z",":","np.ndarray","A","vector","of","(","transformed",")","latent","variables","Returns","--","--","--","--","--","h-length","vector","of","mean","predictions"]
code: def _mean_prediction(self, mu, Y, h, t_z):
      """Creates a h-step ahead mean prediction
  
      Parameters
      ----------
      mu : np.ndarray
          The past predicted values
  
      Y : np.ndarray
          The past data
  
      h : int
          How many steps ahead for the prediction
  
      t_z : np.ndarray
          A vector of (transformed) latent variables
  
      Returns
      ----------
      h-length vector of mean predictions
      """
  
      # Create arrays to iteratre over
      Y_exp = Y.copy()
  
      # Loop over h time periods
      for t in range(0, h):
          if self.ar != 0:
              Y_exp_normalized = (
                  Y_exp[-self.ar :][::-1] - self._norm_mean
              ) / self._norm_std
              new_value = self.predict_new(
                  np.append(1.0, Y_exp_normalized),
                  self.latent_variables.get_z_values(),
              )
  
          else:
              new_value = self.predict_new(
                  np.array([1.0]), self.latent_variables.get_z_values()
              )
  
          Y_exp = np.append(Y_exp, [self.link(new_value)])
  
      return Y_exp
  
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 9 for calling the NNARX obj's underlying member method code with example usage: obj._mean_prediction(mu, Y, h, t_z) and returns: Y_exp