[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [Help-glpk] formulating svm

**From**: |
Kaustubh Raosaheb Patil |

**Subject**: |
[Help-glpk] formulating svm |

**Date**: |
Tue, 16 Mar 2010 13:51:06 +0100 |

**User-agent**: |
Mozilla-Thunderbird 2.0.0.19 (X11/20090105) |

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] formulating svm**,
*Kaustubh Raosaheb Patil* **<=**