R/rbf.R

Defines functions ker2 ker

# RBF kernel

ker <- function(x, l, sigf) {
  rbf <- kernlab::rbfdot(sigma = 1/l)
  return(sigf * kernlab::kernelMatrix(rbf, x = x))
}

ker2 <- function(x, y, l, sigf) {
  rbf <- kernlab::rbfdot(sigma = 1/l)
  return(sigf * kernlab::kernelMatrix(rbf, x = x, y = y))
}
tahmid-usc/GPReg documentation built on Sept. 10, 2020, 12:05 a.m.