1
$\begingroup$

I am trying to implement the SVM with hard margin from scratch. I have reduced the problem to finding the solution from the following optimisation problem $$ \operatorname{max}\limits_{\alpha}L(\alpha)=(1)^{T} \alpha-\frac{1}{2} \alpha^{T}\left[\begin{array}{ccc} y_{1} y_{1} x_{1}\cdot x_{1} & \cdots & y_{1} y_{N} x_{1}\cdot x_{N} \\ \vdots & \ddots & \vdots \\ y_{N} y_{1} x_{N}\cdot x_{1} & \cdots & y_{N} y_{N} x_{N}\cdot x_{N} \end{array}\right] \alpha \text { where } \alpha_{i} \geq 0 \text { and } \sum_{i=1}^{N} \alpha_{i} y_{t}=0 $$

As a naive approach I have tried to solve $\nabla L(\alpha)=(1)^{T}-\left[\begin{array}{ccc} y_{1} y_{1} x_{1}\cdot x_{1} & \cdots & y_{1} y_{N} x_{1}\cdot x_{N} \\ \vdots & \ddots & \vdots \\ y_{N} y_{1} x_{N}\cdot x_{1} & \cdots & y_{N} y_{N} x_{N}\cdot x_{N} \end{array}\right] \alpha =0$

But, not surprisingly, the matrix is singular. Do you have any advice on how to solve the optimisation problem?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.