公有成员 | 保护属性

CLPM类参考


详细描述

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.

参见:
CLPBoost

在文件LPM.h43行定义。

继承图,类CLPM
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CLPM ()
virtual ~CLPM ()
virtual bool train (CFeatures *data=NULL)
virtual EClassifierType get_classifier_type ()
virtual void set_features (CDotFeatures *feat)
void set_C (float64_t c_neg, float64_t c_pos)
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

保护属性

float64_t C1
float64_t C2
bool use_bias
float64_t epsilon

构造及析构函数文档

CLPM (  ) 

在文件LPM.cpp22行定义。

~CLPM (  )  [virtual]

在文件LPM.cpp28行定义。


成员函数文档

bool get_bias_enabled (  ) 

在文件LPM.h89行定义。

float64_t get_C1 (  ) 

在文件LPM.h85行定义。

float64_t get_C2 (  ) 

在文件LPM.h86行定义。

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

返回:
classifier type NONE

重载CClassifier

在文件LPM.h59行定义。

float64_t get_epsilon (  ) 

在文件LPM.h92行定义。

virtual const char* get_name (  )  const [virtual]
返回:
object name

实现了CSGObject

在文件LPM.h95行定义。

void set_bias_enabled ( bool  enable_bias  ) 

在文件LPM.h88行定义。

void set_C ( float64_t  c_neg,
float64_t  c_pos 
)

set C

参数:
c_neg new C constant for negatively labeled examples
c_pos new C constant for positively labeled examples

在文件LPM.h83行定义。

void set_epsilon ( float64_t  eps  ) 

在文件LPM.h91行定义。

virtual void set_features ( CDotFeatures feat  )  [virtual]

set features

参数:
feat features to set

重载CLinearClassifier

在文件LPM.h68行定义。

bool train ( CFeatures data = NULL  )  [virtual]

train classifier

参数:
data training data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data)
返回:
whether training was successful

重载CClassifier

在文件LPM.cpp32行定义。


成员数据文档

float64_t C1 [protected]

在文件LPM.h98行定义。

float64_t C2 [protected]

在文件LPM.h99行定义。

float64_t epsilon [protected]

在文件LPM.h101行定义。

bool use_bias [protected]

在文件LPM.h100行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation