Quadratic Programming Solver
ipop solves the quadratic programming problem :
subject to:
ipop(c, H, A, b, l, u, r, sigf = 7, maxiter = 40, margin = 0.05, bound = 10, verb = 0)
c
: Vector or one column matrix appearing in the quadratic functionH
: square matrix appearing in the quadratic function, or the decomposed form of the matrix where is a matrix with and .A
: Matrix defining the constrains under which we minimize the quadratic functionb
: Vector or one column matrix defining the constrainsl
: Lower bound vector or one column matrixu
: Upper bound vector or one column matrixr
: Vector or one column matrix defining constrainssigf
: Precision (default: 7 significant figures)maxiter
: Maximum number of iterationsmargin
: how close we get to the constrainsbound
: Clipping bound for the variablesverb
: Display convergence information during runtimeipop uses an interior point method to solve the quadratic programming problem.
The matrix can also be provided in the decomposed form
where in that case the Sherman Morrison Woodbury formula is used internally.
An S4 object with the following slots - primal: Vector containing the primal solution of the quadratic problem
dual: The dual solution of the problem
how: Character string describing the type of convergence
all slots can be accessed through accessor functions (see example)
R. J. Vanderbei
LOQO: An interior point code for quadratic programming
Optimization Methods and Software 11, 451-484, 1999
https://vanderbei.princeton.edu/ps/loqo5.pdf
Alexandros Karatzoglou (based on Matlab code by Alex Smola)
alexandros.karatzoglou@ci.tuwien.ac.at
solve.QP
, inchol
, csi
## solve the Support Vector Machine optimization problem data(spam) ## sample a scaled part (500 points) of the spam data set m <- 500 set <- sample(1:dim(spam)[1],m) x <- scale(as.matrix(spam[,-58]))[set,] y <- as.integer(spam[set,58]) y[y==2] <- -1 ##set C parameter and kernel C <- 5 rbf <- rbfdot(sigma = 0.1) ## create H matrix etc. H <- kernelPol(rbf,x,,y) c <- matrix(rep(-1,m)) A <- t(y) b <- 0 l <- matrix(rep(0,m)) u <- matrix(rep(C,m)) r <- 0 sv <- ipop(c,H,A,b,l,u,r) sv dual(sv)
Useful links