Details from gpml: Please consider that minimize execution path computes a new search direction during extrapolation using conjugate gradients (Polack-Ribiere flavour), or reverts to steepest if there was a problem in the previous line-search. Returns the best value so far, if two consecutive line-searches fail, or whenever it run out of function evaluations or line-searches. During extrapolation, the "f" function may fail either with an error or returning Nan or Inf, and minimize should handle this gracefully. If minimize stopped within a few iterations, it could be an indication that the function values and derivatives are not consistent (ie, there may be a bug in the implementation of your "f" function).
minimize(X, f, .length, covfunc, x, y)
X
.f
is a string value containing the function name which is supposed to apply minimize on it..length
defines how long minimize procedure must be executed.f
.f
.f
.X
, a vector of function values fX
indicating the progress made and i
the number of iterations.
loghyper= array(c(-1,-1,-1), dim=c(3,1))
covfunc ="covSum,covSEiso,covNoise"
x= array(c(1,1,0,0), dim=c(2,2))
y= array(c(1,0), dim=c(2,1))
loghyper = minimize(loghyper, 'gpr', 10, covfunc, x, y)
loghyper
Run the code above in your browser using DataLab