3

Given a dataset $\{(x_i,y_i)\}_{i=1}^n$, the primal problem for $\nu$-SVM is: \begin{align} &\min_{w,b,\xi,\rho} && \frac{1}{2}w^\top w-\nu\rho+\frac{1}{n}\sum_{i=1}^n\xi_i\\ &\text{subject to} && y_i(w^\top x_i+b)\geq\rho-\xi_i,\\ & && \xi_i\geq0, \rho\geq0. \end{align}

I need the value of $\rho$ for a computational problem that I am working on. Method for computing $\rho$ from the dual solution $\alpha$ can be found in sec. 4.2 of the LIBSVM paper. Similar ways can also be found in, for example, sec. 7.4 of this tutorial, or sec. 7 of the original paper by Schölkopf et al. However, using them requires the unscaled version of $\alpha$, but LIBSVM (thus e1071) returns $\alpha/\rho$ directly instead (see sec. 2.2 of the LIBSVM paper). Is there a way to bypass this issue?

Francis
  • 2,972
  • 1
  • 20
  • 26

1 Answers1

2

We can recover this by noting that $0 \leq \alpha_i \leq C = \frac{1}{\rho n}$ (from that same section in the LIBSVM paper, substituing $n$ for $l$). Thus, $\rho = \frac{1}{n \max \alpha_i}$. Note that this is tight even in the case that the problem is separable.

MotiNK
  • 1,224
  • 6
  • 14