https://github.com/cran/mlegp
Tip revision: 95bb84eb250c116201a2115cb2755a8aeb4df479 authored by Garrett M. Dancik on 10 December 2012, 00:00:00 UTC
version 3.1.3
version 3.1.3
Tip revision: 95bb84e
setParams.R
`setParams` <-
function(x, s) {
if (!is.gp(x) && !is.gp.list(x)) {
stop("x must be of type gp or gp.list")
}
if (length(s) != x$numDim){
stop("s must be same length as x$numDim")
}
x$params = s
if (is.gp.list(x)) {
for (i in 1:x$numGPs) {
x[[1]]$params = s
}
}
return (x)
}