# SVM with non-negative weights

An SVM classifier can be obtained by solving the following,

$\arg\min \frac{1}{2}\|W\|_2^2 + C\sum_i \max(0, 1-y_i (W^T\mathbf{x}_i + b))$

where $W$ is the hyperplane (or weights), $b$ is the bias, $y_i$ is the label and $\mathbf{x}_i$ is the feature of an instance $i$.

For some reason I need to constaint all the elements in $W$ should be non-negative, i.e. $w_j \geq 0, \forall j$. Bias could take any values.

1. Is this reasonable?
2. If it is, are there any pakages (e.g. liblinear) I can use directly for this?
3. How can I optimize $W$ with non-negative constraints?

Alternatively, you also can try to find some algorithms which updates $w_{i}$ separately so that you can slightly rewrite the iteration formulas with $w_i^* = max(w_i, 0)$.