ipop solves the quadratic programming problem :
ipop(c, H, A, b, l, u, r, sigf = 7, maxiter = 40, margin = 0.05,
bound = 10, verb = 0)
Vector or one column matrix appearing in the quadratic function
square matrix appearing in the quadratic function, or the
decomposed form
Matrix defining the constrains under which we minimize the quadratic function
Vector or one column matrix defining the constrains
Lower bound vector or one column matrix
Upper bound vector or one column matrix
Vector or one column matrix defining constrains
Precision (default: 7 significant figures)
Maximum number of iterations
how close we get to the constrains
Clipping bound for the variables
Display convergence information during runtime
An S4 object with the following slots
Vector containing the primal solution of the quadratic problem
The dual solution of the problem
Character string describing the type of convergence
all slots can be accessed through accessor functions (see example)
ipop uses an interior point method to solve the quadratic programming
problem.
The
R. J. Vanderbei LOQO: An interior point code for quadratic programming Optimization Methods and Software 11, 451-484, 1999 http://www.princeton.edu/~rvdb/ps/loqo5.pdf
# NOT RUN {
## 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)
# }
Run the code above in your browser using DataLab