ipop                 package:kernlab                 R Documentation

_Q_u_a_d_r_a_t_i_c _P_r_o_g_r_a_m_m_i_n_g _S_o_l_v_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     ipop solves the quadratic programming problem :
      min(c'*x + 1/2 * x' * H * x)
      subject to: 
      b <= A * x <= b + r
      l <= x <= u

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

       c: Vector or one column matrix appearing in the quadratic
          function

       H: square matrix appearing in the quadratic function, or the
          decomposed form Z of the H matrix where Z is a n x m matrix
          with n > m and ZZ' = 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

_D_e_t_a_i_l_s:

     ipop uses an interior point method to solve the quadratic
     programming problem. 
      The H matrix can also be provided in the decomposed form Z where
     ZZ' = H in that case the Sherman Morrison Woodbury formula is used
     internally.

_V_a_l_u_e:

     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)

_A_u_t_h_o_r(_s):

     Alexandros Karatzoglou (based on Matlab code by Alex Smola) 
      alexandros.karatzoglou@ci.tuwien.ac.at

_R_e_f_e_r_e_n_c_e_s:

     R. J. Vanderbei
      _LOQO: An interior point code for quadratic programming_
      Optimization Methods and Software 11, 451-484, 1999 
      <URL: http://www.sor.princeton.edu/~rvdb/ps/loqo3.ps.gz>

_S_e_e _A_l_s_o:

     'solve.QP', 'inchol', 'csi'

_E_x_a_m_p_l_e_s:

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

