minimize: Minimize function for differentiable multivariate functions.

Description Usage Arguments Value Author(s) References Examples

Description

Performs mimization on a differentiable multivariate function and returns a function value and a vector of partial derivatives the input function. The Polack-Ribiere flavour of conjugate gradients is used to compute search directions, and a line search using quadratic and cubic polynomial approximations and the Wolfe-Powell stopping criteria is used together with the slope ratio method for guessing initial step sizes.

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).

Usage

1
minimize(X, f, .length, covfunc, x, y)

Arguments

X

Starting point is given by array X .

f

f is a string value containing the function name which is supposed to apply minimize on it.

.length

.length defines how long minimize procedure must be executed.

covfunc

is string value that gives the name of covariance function which is passed on to the function f.

x

Input parameter which is passed on to the function f.

y

An other input parameter like x which is passed on to the function. It usually defines target value function covfunc and the input array x. f.

Value

if .length is positive, it defines the maximum number of line searches, if negative its absolute gives the maximum allowed number of function evaluations. .length can have a second optional component, which indicates the reduction in function value to be expected in the first line-search. its default value is 1.0 .

The function returns when either its length is up, or if no further progress can be made due to a (local) minimum or due to numerical problems. The function returns a list consisting of the found solution X, a vector of function values fX indicating the progress made and i the number of iterations.

Author(s)

Afshin Sadeghi

References

Carl Edward Rasmussen and Christopher K. I. Williams.Gaussian Processes for Machine Learning. MIT Press, 2006. ISBN 0-262-18253-X. Carl Edward Rasmussen & Hannes Nickisch. gpml(GAUSSIAN PROCESS REGRESSION AND CLASSIFICATION Toolbox) Matlab Library.

Examples

1
2
3
4
5
6
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

Example output

[[1]]
           [,1]
[1,] -1.0000000
[2,] -2.6177289
[3,] -0.3518741

[[2]]
       [,1]
   2.850202
f0 2.180126
f0 2.147200
f0 2.146995
f0 2.144900
f0 2.144789
f0 2.144787

[[3]]
[1] 9

gpr documentation built on May 1, 2019, 8:06 p.m.

Related to minimize in gpr...