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

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 ()
virtual const char * get_name () const

Protected Attributes

svm_problem problem
svm_parameter param
struct svm_modelmodel

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

virtual const char* CLibSVR::get_name (  )  const [virtual]
Returns:
object name

Reimplemented from CSVM.

Definition at line 79 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 87 of file LibSVR.h.

svm_parameter CLibSVR::param [protected]

SVM parameter

Definition at line 84 of file LibSVR.h.

svm_problem CLibSVR::problem [protected]

SVM problem

Definition at line 82 of file LibSVR.h.


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

SHOGUN Machine Learning Toolbox - Documentation