Public Member Functions | Protected Member Functions | Protected Attributes

CLibSVR Class Reference

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 51 of file LibSVR.h.

Inheritance diagram for CLibSVR:
Inheritance graph

List of all members.

Public Member Functions

 CLibSVR ()
 CLibSVR (float64_t C, float64_t epsilon, CKernel *k, CLabels *lab)
virtual ~CLibSVR ()
virtual EClassifierType get_classifier_type ()
virtual const char * get_name () const

Protected Member Functions

virtual bool train_machine (CFeatures *data=NULL)

Protected Attributes

svm_problem problem
svm_parameter param
struct svm_model * model

Constructor & Destructor Documentation

CLibSVR (  ) 

default constructor

Definition at line 16 of file LibSVR.cpp.

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


C constant C
epsilon tube epsilon
k kernel
lab labels

Definition at line 22 of file LibSVR.cpp.

~CLibSVR (  )  [virtual]

Definition at line 33 of file LibSVR.cpp.

Member Function Documentation

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

classifie type LIBSVR

Reimplemented from CMachine.

Definition at line 71 of file LibSVR.h.

virtual const char* get_name ( void   )  const [virtual]
object name

Reimplemented from CSVM.

Definition at line 74 of file LibSVR.h.

bool train_machine ( CFeatures data = NULL  )  [protected, virtual]

train regression

data training data (parameter can be avoided if distance or kernel-based regressor are used and distance/kernels are initialized with train data)
whether training was successful

Reimplemented from CMachine.

Definition at line 38 of file LibSVR.cpp.

Member Data Documentation

struct svm_model* model [protected]

SVM model

Definition at line 93 of file LibSVR.h.

svm_parameter param [protected]

SVM parameter

Definition at line 90 of file LibSVR.h.

svm_problem problem [protected]

SVM problem

Definition at line 88 of file LibSVR.h.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation