R/whiteKernCompute.R

whiteKernCompute <-
function (kern, x, x2) {
  if ( nargs()<3 ) {
    xdim <- dim(as.array(x))[1]
    k <- kern$variance*diag(1, nrow=xdim, ncol=xdim)
  } else {
    x1dim <- dim(as.array(x))[1]
    x2dim <- dim(as.array(x2))[1]
    k <- matrix(0, nrow=x1dim, ncol=x2dim)
  }
  return (k)
}

Try the gptk package in your browser

Any scripts or data that you put into this service are public.

gptk documentation built on May 2, 2019, 3:27 p.m.