class_docstr: Inherits time series methods from TSM class.
  
  **** GAUSSIAN PROCESS NONLINEAR AUTOREGRESSIVE (GP-NARX) MODELS ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.array
      Field to specify the time series data that will be used.
  
  ar : int
      Field to specify how many AR terms the model will have.
  
  kernel : kernel object
      For example, SquaredExponential() or OrnsteinUhlenbeck()
  
  integ : int (default : 0)
      Specifies how many time 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.
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","GAUSSIAN","PROCESS","NONLINEAR","AUTOREGRESSIVE","(","GP-NARX",")","MODELS","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","or","np.array","Field","to","specify","the","time","series","data","that","will","be","used",".","ar",":","int","Field","to","specify","how","many","AR","terms","the","model","will","have",".","kernel",":","kernel","object","For","example",",","SquaredExponential","(",")","or","OrnsteinUhlenbeck","(",")","integ",":","int","(","default",":","0",")","Specifies","how","many","time","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","."]
docstr: Creates h-step ahead forecasts for the Gaussian process
  
  Parameters
  ----------
  beta : np.array
      Contains untransformed starting values for the latent variables
  
  h: int
      How many steps ahead to forecast
  
  Returns
  ----------
  - predictions
  - variance of predictions
docstr_tok: ["Creates","h-step","ahead","forecasts","for","the","Gaussian","process","Parameters","--","--","--","--","--","beta",":","np.array","Contains","untransformed","starting","values","for","the","latent","variables","h",":","int","How","many","steps","ahead","to","forecast","Returns","--","--","--","--","--","-","predictions","-","variance","of","predictions"]
code: def _construct_predict(self, beta, h):
      """Creates h-step ahead forecasts for the Gaussian process
  
      Parameters
      ----------
      beta : np.array
          Contains untransformed starting values for the latent variables
  
      h: int
          How many steps ahead to forecast
  
      Returns
      ----------
      - predictions
      - variance of predictions
      """
  
      # Refactor this entire code in future
      parm = np.array(
          [
              self.latent_variables.z_list[k].prior.transform(beta[k])
              for k in range(beta.shape[0])
          ]
      )
      Xstart = self.X().copy()
      Xstart = [i for i in Xstart]
      predictions = np.zeros(h)
      variances = np.zeros(h)
  
      for step in range(0, h):
          Xstar = []
  
          for lag in range(0, self.max_lag):
              if lag == 0:
                  if step == 0:
                      Xstar.append([self.data[-1]])
                      Xstart[0] = np.append(Xstart[0], self.data[-1])
                  else:
                      Xstar.append([predictions[step - 1]])
                      Xstart[0] = np.append(
                          Xstart[0], predictions[step - 1]
                      )
              else:
                  Xstar.append([Xstart[lag - 1][-2]])
                  Xstart[lag] = np.append(
                      Xstart[lag], Xstart[lag - 1][-2]
                  )
  
          Kstar = self.kernel.Kstar(parm, np.transpose(np.array(Xstar)))
  
          L = self._L(parm)
          alpha = self._alpha(L)
  
          predictions[step] = np.dot(np.transpose(Kstar), alpha)
          v = la.cho_solve((L, True), Kstar)
          variances[step] = self.kernel.Kstarstar(
              parm, np.transpose(np.array(Xstar))
          ) - np.dot(v.T, v)
  
      return (
          predictions,
          variances,
          predictions - 1.98 * np.power(variances, 0.5),
          predictions + 1.98 * np.power(variances, 0.5),
      )
  
imports: import sys
  import numpy
  import pandas
  import scipy.linalg
  import scipy.sparse
  import scipy.stats
  from scipy.stats import multivariate_normal
  from ..None import arma
  from ..None import output
  from ..None import tests
  from ..None import tsm
  from ..None import data_check
  from .kernels import *
label_desc: Use image node_id 3 for calling the GPNARX obj's underlying member method code with example usage: obj._construct_predict(beta, h) and returns: predictions,  variances,  unknown,  unknown