Hi,
I am trying to formulated a linear programming svm (support vector
machine) using glpk. The problem is described as follows, given a set of
observations X (a matrix with n rows and m columns) and a vector y with
class labels {+1,-1} for each of the observations (n entries); find the
following optimized solutions;
PRIMAL
minimize 0.5 * SUM{from j=1 to m} |wj| - ( SUM{from i=1 to n} alphai *
(yi*(w^T*xi - 1)) )
i and j indicate the vector/matrix elements
here vector w is the weight vector of length m
alpha is a vector of length n (Lagrange multipliers)
DUAL
maximize SUM{for i=1 to n} alphai - 0.5 * SUM{from i,j=1 to n}
alphai*alphaj*yi*yj*(xi^T*xj)
subject to alphai >= 0 for i=1 to n
specifically I would like to use the R interface to glpk. I am not sure
how these objective functions can be converted into a vector of
coefficients.
Any suggestions are welcome.
best
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk