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","."]
code: def __init__(self, data, ar, kernel, integ=0, target=None):
      # Initialize TSM object
      super(GPNARX, self).__init__("GPNARX")
  
      # Latent variables
      self.ar = ar
  
      if ar < 1:
          raise ValueError("Cannot have less than 1 AR term!")
  
      self.integ = integ
  
      self.max_lag = self.ar
      self.model_name = "GPNARX(" + str(self.ar) + ")"
      self._z_hide = (
          0  # Whether to cutoff variance latent variables from results
      )
      self.supported_methods = ["MLE", "PML", "Laplace", "M-H", "BBVI"]
      self.default_method = "MLE"
  
      self.multivariate_model = False
  
      # Format the data
      (
          self.data,
          self.data_name,
          self.is_pandas,
          self.index,
      ) = dc.data_check(data, target)
      self.data_original = self.data.copy()
  
      # Difference data
      for order in range(self.integ):
          self.data = np.diff(self.data)
          self.data_name = "Differenced " + self.data_name
      self.index = self.index[self.integ : len(self.index)]
  
      # Apply normalization
      self.data_full = self.data.copy()
      self.data = np.array(
          self.data_full[self.max_lag : self.data_full.shape[0]]
      )  # adjust for lags
      self._norm_mean = np.mean(self.data)
      self._norm_std = np.std(self.data)
      self.data = (self.data - self._norm_mean) / self._norm_std
      self.data_full = (
          self.data_full - self._norm_mean
      ) / self._norm_std
  
      self.kernel = kernel
      self.kernel.X = self.X().T
  
      # Define latent variables
      self._create_latent_variables()
  
      self.neg_loglik = self.full_neg_loglik
  
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 1 to create a new GPNARX object from inherited base classes: tsm with example: obj = GPNARX(data, ar, kernel, integ, target)