CLPM Class Reference


Detailed Description

Class LPM trains a linear classifier called Linear Programming Machine, i.e. a SVM using a $\ell_1$ norm regularizer.

It solves the following optimization problem using CPLEX:

\begin{eqnarray*} \min_{{\bf w}={(\bf w^+},{\bf w^-}), b, {\bf \xi}} && \sum_{i=1}^N ( {\bf w}^+_i + {\bf w}^-_i) + C \sum_{i=1}^{N} \xi_i\\ \mbox{s.t.} && -y_i(({\bf w}^+-{\bf w}^-)^T {\bf x}_i + b)-{\bf \xi}_i \leq -1\\ && \quad {\bf x}_i \geq 0\\\ && {\bf w}_i \geq 0,\quad \forall i=1\dots N \end{eqnarray*}

Note that currently CPLEX is required to solve this problem. A faster implementation is available in CLPBoost.

See also:
CLPBoost

Definition at line 41 of file LPM.h.

Inheritance diagram for CLPM:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CLPM ()
virtual ~CLPM ()
virtual bool train ()
virtual EClassifierType get_classifier_type ()
virtual void set_features (CDotFeatures *feat)
void set_C (float64_t c1, float64_t c2)
float64_t get_C1 ()
float64_t get_C2 ()
void set_bias_enabled (bool enable_bias)
bool get_bias_enabled ()
void set_epsilon (float64_t eps)
float64_t get_epsilon ()
virtual const char * get_name () const

Protected Attributes

float64_t C1
float64_t C2
bool use_bias
float64_t epsilon

Constructor & Destructor Documentation

CLPM::CLPM (  ) 

Definition at line 20 of file LPM.cpp.

CLPM::~CLPM (  )  [virtual]

Definition at line 26 of file LPM.cpp.


Member Function Documentation

bool CLPM::get_bias_enabled (  ) 

Definition at line 73 of file LPM.h.

float64_t CLPM::get_C1 (  ) 

Definition at line 69 of file LPM.h.

float64_t CLPM::get_C2 (  ) 

Definition at line 70 of file LPM.h.

virtual EClassifierType CLPM::get_classifier_type (  )  [virtual]

get classifier type

Returns:
classifier type NONE

Reimplemented from CClassifier.

Definition at line 49 of file LPM.h.

float64_t CLPM::get_epsilon (  ) 

Definition at line 76 of file LPM.h.

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

Implements CSGObject.

Definition at line 79 of file LPM.h.

void CLPM::set_bias_enabled ( bool  enable_bias  ) 

Definition at line 72 of file LPM.h.

void CLPM::set_C ( float64_t  c1,
float64_t  c2 
)

Definition at line 67 of file LPM.h.

void CLPM::set_epsilon ( float64_t  eps  ) 

Definition at line 75 of file LPM.h.

virtual void CLPM::set_features ( CDotFeatures feat  )  [virtual]

set features

Parameters:
feat features to set

Reimplemented from CLinearClassifier.

Definition at line 58 of file LPM.h.

bool CLPM::train (  )  [virtual]

train classifier

Returns:
whether training was successful

Reimplemented from CClassifier.

Definition at line 30 of file LPM.cpp.


Member Data Documentation

float64_t CLPM::C1 [protected]

Definition at line 82 of file LPM.h.

float64_t CLPM::C2 [protected]

Definition at line 83 of file LPM.h.

float64_t CLPM::epsilon [protected]

Definition at line 85 of file LPM.h.

bool CLPM::use_bias [protected]

Definition at line 84 of file LPM.h.


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

SHOGUN Machine Learning Toolbox - Documentation