CLibSVR Class Reference

Inheritance diagram for CLibSVR:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 CLibSVR ()
 CLibSVR (float64_t C, float64_t epsilon, CKernel *k, CLabels *lab)
virtual ~CLibSVR ()
virtual bool train ()
virtual EClassifierType get_classifier_type ()

Protected Attributes

svm_problem problem
svm_parameter param
struct svm_modelmodel


Detailed Description

Class LibSVR, performs support vector regression using LibSVM. The SVR solution can be expressed as

\[ f({\bf x})=\sum_{i=1}^{N} \alpha_i k({\bf x}, {\bf x_i})+b \]

where $\alpha$ and $b$ are determined in training, i.e. using a pre-specified kernel, a given tube-epsilon for the epsilon insensitive loss, the follwoing quadratic problem is minimized (using sequential minimal decomposition (SMO))

\begin{eqnarray*} \max_{{\bf \alpha},{\bf \alpha}^*} &-\frac{1}{2}\sum_{i,j=1}^N(\alpha_i-\alpha_i^*)(\alpha_j-\alpha_j^*){\bf x}_i^T {\bf x}_j -\sum_{i=1}^N(\alpha_i+\alpha_i^*)\epsilon - \sum_{i=1}^N(\alpha_i-\alpha_i^*)y_i\\ \mbox{wrt}:& {\bf \alpha},{\bf \alpha}^*\in{\bf R}^N\\ \mbox{s.t.}:& 0\leq \alpha_i,\alpha_i^*\leq C,\, \forall i=1\dots N\\ &\sum_{i=1}^N(\alpha_i-\alpha_i^*)y_i=0 \end{eqnarray*}

Note that the SV regression problem is reduced to the standard SV classification problem by introducing artificial labels $-y_i$ which leads to the epsilon insensitive loss constraints *

\begin{eqnarray*} {\bf w}^T{\bf x}_i+b-c_i-\xi_i\leq 0,&\, \forall i=1\dots N\\ -{\bf w}^T{\bf x}_i-b-c_i^*-\xi_i^*\leq 0,&\, \forall i=1\dots N \end{eqnarray*}

with $c_i=y_i+ \epsilon$ and $c_i^*=-y_i+ \epsilon$

Definition at line 48 of file LibSVR.h.


Constructor & Destructor Documentation

CLibSVR::CLibSVR (  ) 

default constructor

Definition at line 14 of file LibSVR.cpp.

CLibSVR::CLibSVR ( float64_t  C,
float64_t  epsilon,
CKernel k,
CLabels lab 
)

constructor

Parameters:
C constant C
epsilon epsilon
k kernel
lab labels

Definition at line 20 of file LibSVR.cpp.

CLibSVR::~CLibSVR (  )  [virtual]

Definition at line 31 of file LibSVR.cpp.


Member Function Documentation

virtual EClassifierType CLibSVR::get_classifier_type (  )  [virtual]

get classifier type

Returns:
classifie type LIBSVR

Reimplemented from CClassifier.

Definition at line 74 of file LibSVR.h.

bool CLibSVR::train (  )  [virtual]

train regression

Returns:
if training was successful

Reimplemented from CClassifier.

Definition at line 36 of file LibSVR.cpp.


Member Data Documentation

struct svm_model* CLibSVR::model [read, protected]

SVM model

Definition at line 83 of file LibSVR.h.

SVM parameter

Definition at line 80 of file LibSVR.h.

SVM problem

Definition at line 78 of file LibSVR.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation