Implementing a weighted support vector machine in python
I have the following problem.
The minimization problem of the SVM that I want to solve is:
$$ \min_{w, b} \frac{1}{2}w^{T}w + \sum^{m}_{i=1}C_{i}xi_{i} $$ Subject to: $$ y_{i}(w^{T}x_{i} - b) \geq 1 - \xi_{i} $$ $$ \xi_{i} \geq 0 $$ $$ C_{i} = \nu_{i}C $$ where $\nu_{i}$ is some function.
Now the minimization problem that the base SVM solves is: $$ \min_{w, b} \frac{1}{2}w^{T}w + C\sum^{m}_{i=1}xi_{i} $$ Subject to: $$ y_{i}(w^{T}x_{i} - b) \geq 1 - \xi_{i} $$ $$ \xi_{i} \geq 0 $$
reference: https://www.sciencedirect.com/science/article/abs/pii/S0957417414006228?via%3Dihub
I was wondering is there a way I can change implement this in sklearn, its for a paper that im working.
Kind regards.
Category Data Science