CLPBoost Class Reference


Detailed Description

Class LPBoost 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 Boosting on the input features:

\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. This implementation is faster than solving the linear program directly in CPLEX (as was done in CLPM).

See also:
CLPM

Definition at line 46 of file LPBoost.h.

Inheritance diagram for CLPBoost:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CLPBoost ()
virtual ~CLPBoost ()
virtual bool train ()
virtual EClassifierType get_classifier_type ()
bool init (int32_t num_vec)
void cleanup ()
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 ()
float64_t find_max_violator (int32_t &max_dim)
virtual const char * get_name () const

Protected Attributes

float64_t C1
float64_t C2
bool use_bias
float64_t epsilon
float64_tu
CDynamicArray< int32_t > * dim
int32_t num_sfeat
int32_t num_svec
TSparse< float64_t > * sfeat

Constructor & Destructor Documentation

CLPBoost::CLPBoost (  ) 

Definition at line 23 of file LPBoost.cpp.

CLPBoost::~CLPBoost (  )  [virtual]

Definition at line 34 of file LPBoost.cpp.


Member Function Documentation

void CLPBoost::cleanup (  ) 

Definition at line 55 of file LPBoost.cpp.

float64_t CLPBoost::find_max_violator ( int32_t &  max_dim  ) 

Definition at line 67 of file LPBoost.cpp.

bool CLPBoost::get_bias_enabled (  ) 

Definition at line 81 of file LPBoost.h.

float64_t CLPBoost::get_C1 (  ) 

Definition at line 77 of file LPBoost.h.

float64_t CLPBoost::get_C2 (  ) 

Definition at line 78 of file LPBoost.h.

virtual EClassifierType CLPBoost::get_classifier_type (  )  [virtual]

get classifier type

Returns:
classifier type NONE

Reimplemented from CClassifier.

Definition at line 54 of file LPBoost.h.

float64_t CLPBoost::get_epsilon (  ) 

Definition at line 84 of file LPBoost.h.

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

Implements CSGObject.

Definition at line 89 of file LPBoost.h.

bool CLPBoost::init ( int32_t  num_vec  ) 

Definition at line 39 of file LPBoost.cpp.

void CLPBoost::set_bias_enabled ( bool  enable_bias  ) 

Definition at line 80 of file LPBoost.h.

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

Definition at line 75 of file LPBoost.h.

void CLPBoost::set_epsilon ( float64_t  eps  ) 

Definition at line 83 of file LPBoost.h.

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

set features

Parameters:
feat features to set

Reimplemented from CLinearClassifier.

Definition at line 66 of file LPBoost.h.

bool CLPBoost::train (  )  [virtual]

train classifier

Returns:
whether training was successful

Reimplemented from CClassifier.

Definition at line 102 of file LPBoost.cpp.


Member Data Documentation

float64_t CLPBoost::C1 [protected]

Definition at line 92 of file LPBoost.h.

float64_t CLPBoost::C2 [protected]

Definition at line 93 of file LPBoost.h.

CDynamicArray<int32_t>* CLPBoost::dim [protected]

Definition at line 98 of file LPBoost.h.

Definition at line 95 of file LPBoost.h.

int32_t CLPBoost::num_sfeat [protected]

Definition at line 100 of file LPBoost.h.

int32_t CLPBoost::num_svec [protected]

Definition at line 101 of file LPBoost.h.

TSparse<float64_t>* CLPBoost::sfeat [protected]

Definition at line 102 of file LPBoost.h.

float64_t* CLPBoost::u [protected]

Definition at line 97 of file LPBoost.h.

bool CLPBoost::use_bias [protected]

Definition at line 94 of file LPBoost.h.


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

SHOGUN Machine Learning Toolbox - Documentation