Description Usage Arguments Examples
This function allows you to calculate a Gaussian process kernel
1 |
xd |
Location of the GP prediction |
x |
support points |
y |
support values |
param |
list of parameters, with the right naming convention |
kernel |
list of kernel used to generate the GPs. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | x = list(matrix(runif(5,0,10), ncol = 1))
y = runif(5,-2,2)
xd = list(matrix(seq(min(x[[1]])-1,max(x[[1]])+1,length.out = 100), ncol = 1))
param = list(list(q1=1, q2=2))
kernel = list(k_longterm)
t = GPpred(xd, x,y, param, kernel)
xd = list(expand.grid(seq(0,10,length.out = 10),seq(0,10,length.out = 10)))
param = list(list(s1=2, s2=2))
x = list(matrix(runif(20,0,10),ncol = 2))
y = cos(rowSums(x[[1]]))
kernel = list(k_spatial_iso)
attr(kernel, "type") <- "spatial"
tt = GPpred(xd, x,y, param, kernel)
image(matrix(tt$mp, ncol = 10,byrow=TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.