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: Plots the fit of the Gaussian process model to the data
  
  Parameters
  ----------
  beta : np.array
      Contains untransformed starting values for latent variables
  
  intervals : Boolean
      Whether to plot uncertainty intervals or not
  
  Returns
  ----------
  None (plots the fit of the function)
docstr_tok: ["Plots","the","fit","of","the","Gaussian","process","model","to","the","data","Parameters","--","--","--","--","--","beta",":","np.array","Contains","untransformed","starting","values","for","latent","variables","intervals",":","Boolean","Whether","to","plot","uncertainty","intervals","or","not","Returns","--","--","--","--","--","None","(","plots","the","fit","of","the","function",")"]
code: def plot_fit(self, intervals=True, **kwargs):
      """Plots the fit of the Gaussian process model to the data
  
      Parameters
      ----------
      beta : np.array
          Contains untransformed starting values for latent variables
  
      intervals : Boolean
          Whether to plot uncertainty intervals or not
  
      Returns
      ----------
      None (plots the fit of the function)
      """
      import matplotlib.pyplot as plt
      import seaborn as sns
  
      figsize = kwargs.get("figsize", (10, 7))
  
      date_index = self.index[self.max_lag :]
      expectation = self.expected_values(
          self.latent_variables.get_z_values()
      )
      variance = self.variance_values(
          self.latent_variables.get_z_values()
      )
      upper = expectation + 1.98 * np.power(np.diag(variance), 0.5)
      lower = expectation - 1.98 * np.power(np.diag(variance), 0.5)
  
      plt.figure(figsize=figsize)
  
      plt.subplot(2, 2, 1)
      plt.title(self.data_name + " Raw")
      plt.plot(
          date_index, self.data * self._norm_std + self._norm_mean, "k"
      )
  
      plt.subplot(2, 2, 2)
      plt.title(self.data_name + " Raw and Expected")
      plt.plot(
          date_index,
          self.data * self._norm_std + self._norm_mean,
          "k",
          alpha=0.2,
      )
      plt.plot(
          date_index,
          self.expected_values(self.latent_variables.get_z_values())
          * self._norm_std
          + self._norm_mean,
          "b",
      )
  
      plt.subplot(2, 2, 3)
      plt.title(self.data_name + " Raw and Expected (with intervals)")
  
      if intervals == True:
          plt.fill_between(
              date_index,
              lower * self._norm_std + self._norm_mean,
              upper * self._norm_std + self._norm_mean,
              alpha=0.2,
          )
  
      plt.plot(
          date_index,
          self.data * self._norm_std + self._norm_mean,
          "k",
          alpha=0.2,
      )
      plt.plot(
          date_index,
          self.expected_values(self.latent_variables.get_z_values())
          * self._norm_std
          + self._norm_mean,
          "b",
      )
  
      plt.subplot(2, 2, 4)
  
      plt.title("Expected " + self.data_name + " (with intervals)")
  
      if intervals == True:
          plt.fill_between(
              date_index,
              lower * self._norm_std + self._norm_mean,
              upper * self._norm_std + self._norm_mean,
              alpha=0.2,
          )
  
      plt.plot(
          date_index,
          self.expected_values(self.latent_variables.get_z_values())
          * self._norm_std
          + self._norm_mean,
          "b",
      )
  
      plt.show()
  
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 10 for calling the GPNARX obj's underlying member method code with example usage: obj.plot_fit(intervals) without return types