doc: gp_sample

Sample a Gaussian process in a hypercube and perform Bayesian inferance


 [f, Xs, Fs, Xt, Yt, Kss] = gp_sample(..., 'Name',Value)

Name-Value Pair Arguments

  • d integer for the dimension (default: 1)
  • size scalar for the length of the hypercube (default: 40)
  • ns integer for the number of sampled points (default: 1000)
  • nt integer for the number of training points (default: 10)
  • kernel kernel function (default: @kernel_se_normiso)
  • basis basis function (default: @basis_none)
  • noise scalar for the noise standard deviation (default: 0.01)
  • plot boolean to visualize the optimization (default: true)
  • posterior boolean to compute the Bayesian inferance (default: true)
  • verbose boolean to monitor the process (default: true)


  • f function which returns noisy observations
  • Xs matrix (ns, d) of sampled data
  • Fs matrix (ns, 1) of sampled values
  • Xt matrix (nt, d) of training data
  • Yt vector (nt, 1) of training observations
  • Kss matrix (ns, ns) of kernel values