ipop function

Quadratic Programming Solver

Quadratic Programming Solver

ipop solves the quadratic programming problem :

min(cx+1/2xHx)\min(c'*x + 1/2 * x' * H * x)

subject to:

b<=Ax<=b+rb <= A * x <= b + r

l<=x<=ul <= x <= u

ipop(c, H, A, b, l, u, r, sigf = 7, maxiter = 40, margin = 0.05, bound = 10, verb = 0)

Arguments

  • c: Vector or one column matrix appearing in the quadratic function
  • H: square matrix appearing in the quadratic function, or the decomposed form ZZ of the HH matrix where ZZ is a nxmn x m matrix with n>mn > m and ZZ=HZZ' = H.
  • A: Matrix defining the constrains under which we minimize the quadratic function
  • b: Vector or one column matrix defining the constrains
  • l: Lower bound vector or one column matrix
  • u: Upper bound vector or one column matrix
  • r: Vector or one column matrix defining constrains
  • sigf: Precision (default: 7 significant figures)
  • maxiter: Maximum number of iterations
  • margin: how close we get to the constrains
  • bound: Clipping bound for the variables
  • verb: Display convergence information during runtime

Details

ipop uses an interior point method to solve the quadratic programming problem.

The HH matrix can also be provided in the decomposed form ZZ

where ZZ=HZZ' = H in that case the Sherman Morrison Woodbury formula is used internally.

Returns

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)

References

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

Author(s)

Alexandros Karatzoglou (based on Matlab code by Alex Smola)

alexandros.karatzoglou@ci.tuwien.ac.at

See Also

solve.QP, inchol, csi

Examples

## 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)
  • Maintainer: Alexandros Karatzoglou
  • License: GPL-2
  • Last published: 2024-08-13

Useful links