CSubGradientSVM类参考


详细描述

class SubGradientSVM

在文件SubGradientSVM.h23行定义。

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

所有成员的列表。

公有成员

 CSubGradientSVM ()
 CSubGradientSVM (float64_t C, CDotFeatures *traindat, CLabels *trainlab)
virtual ~CSubGradientSVM ()
virtual EClassifierType get_classifier_type ()
virtual bool train (CFeatures *data=NULL)
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 ()
void set_qpsize (int32_t q)
int32_t get_qpsize ()
void set_qpsize_max (int32_t q)
int32_t get_qpsize_max ()

保护成员

int32_t find_active (int32_t num_feat, int32_t num_vec, int32_t &num_active, int32_t &num_bound)
void update_active (int32_t num_feat, int32_t num_vec)
float64_t compute_objective (int32_t num_feat, int32_t num_vec)
 compute svm objective
float64_t compute_min_subgradient (int32_t num_feat, int32_t num_vec, int32_t num_active, int32_t num_bound)
float64_t line_search (int32_t num_feat, int32_t num_vec)
 performs a line search to determine step size
void compute_projection (int32_t num_feat, int32_t num_vec)
 compute projection
void update_projection (float64_t alpha, int32_t num_vec)
 only computes updates on the projection
void init (int32_t num_vec, int32_t num_feat)
 alloc helper arrays
void cleanup ()
 de-alloc helper arrays
virtual const char * get_name () const

保护属性

float64_t C1
float64_t C2
float64_t epsilon
float64_t work_epsilon
float64_t autoselected_epsilon
int32_t qpsize
int32_t qpsize_max
int32_t qpsize_limit
bool use_bias
int32_t last_it_noimprovement
int32_t num_it_noimprovement
uint8_t * active
uint8_t * old_active
int32_t * idx_active
int32_t * idx_bound
int32_t delta_active
int32_t delta_bound
float64_tproj
float64_ttmp_proj
int32_t * tmp_proj_idx
float64_tsum_CXy_active
float64_tv
float64_told_v
float64_t sum_Cy_active
float64_tgrad_w
float64_t grad_b
float64_tgrad_proj
float64_thinge_point
int32_t * hinge_idx
float64_tbeta
float64_told_beta
float64_tZv
float64_told_Zv
float64_tZ
float64_told_Z
float64_t tim

构造及析构函数文档

CSubGradientSVM (  ) 

default constructor

在文件SubGradientSVM.cpp26行定义。

CSubGradientSVM ( float64_t  C,
CDotFeatures traindat,
CLabels trainlab 
)

constructor

参数:
C constant C
traindat training features
trainlab labels for training features

在文件SubGradientSVM.cpp32行定义。

~CSubGradientSVM (  )  [virtual]

在文件SubGradientSVM.cpp42行定义。


成员函数文档

void cleanup (  )  [protected]

de-alloc helper arrays

在文件SubGradientSVM.cpp487行定义。

float64_t compute_min_subgradient ( int32_t  num_feat,
int32_t  num_vec,
int32_t  num_active,
int32_t  num_bound 
) [protected]

compute minimum norm subgradient return norm of minimum norm subgradient

在文件SubGradientSVM.cpp288行定义。

float64_t compute_objective ( int32_t  num_feat,
int32_t  num_vec 
) [protected]

compute svm objective

在文件SubGradientSVM.cpp386行定义。

void compute_projection ( int32_t  num_feat,
int32_t  num_vec 
) [protected]

compute projection

在文件SubGradientSVM.cpp399行定义。

int32_t find_active ( int32_t  num_feat,
int32_t  num_vec,
int32_t &  num_active,
int32_t &  num_bound 
) [protected]

returns number of changed constraints for precision work_epsilon and fills active array

在文件SubGradientSVM.cpp79行定义。

bool get_bias_enabled (  ) 

check if bias is enabled

返回:
if bias is enabled

在文件SubGradientSVM.h85行定义。

float64_t get_C1 (  ) 

get C1

返回:
C1

在文件SubGradientSVM.h67行定义。

float64_t get_C2 (  ) 

get C2

返回:
C2

在文件SubGradientSVM.h73行定义。

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

返回:
classifier type SUBGRADIENTSVM

重载CClassifier

在文件SubGradientSVM.h44行定义。

float64_t get_epsilon (  ) 

get epsilon

返回:
epsilon

在文件SubGradientSVM.h97行定义。

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

实现了CSGObject

在文件SubGradientSVM.h159行定义。

int32_t get_qpsize (  ) 

get qpsize

返回:
qpsize

在文件SubGradientSVM.h109行定义。

int32_t get_qpsize_max (  ) 

get qpsize_max

返回:
qpsize_max

在文件SubGradientSVM.h121行定义。

void init ( int32_t  num_vec,
int32_t  num_feat 
) [protected]

alloc helper arrays

在文件SubGradientSVM.cpp410行定义。

float64_t line_search ( int32_t  num_feat,
int32_t  num_vec 
) [protected]

performs a line search to determine step size

在文件SubGradientSVM.cpp222行定义。

void set_bias_enabled ( bool  enable_bias  ) 

set if bias shall be enabled

参数:
enable_bias if bias shall be enabled

在文件SubGradientSVM.h79行定义。

void set_C ( float64_t  c1,
float64_t  c2 
)

set C

参数:
c1 new C1
c2 new C2

在文件SubGradientSVM.h61行定义。

void set_epsilon ( float64_t  eps  ) 

set epsilon

参数:
eps new epsilon

在文件SubGradientSVM.h91行定义。

void set_qpsize ( int32_t  q  ) 

set qpsize

参数:
q new qpsize

在文件SubGradientSVM.h103行定义。

void set_qpsize_max ( int32_t  q  ) 

set qpsize_max

参数:
q new qpsize_max

在文件SubGradientSVM.h115行定义。

bool train ( CFeatures data = NULL  )  [virtual]

train SVM 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

在文件SubGradientSVM.cpp524行定义。

void update_active ( int32_t  num_feat,
int32_t  num_vec 
) [protected]

swaps the active / old_active and computes idx_active, idx_bound and sum_CXy_active arrays and the sum_Cy_active variable

在文件SubGradientSVM.cpp201行定义。

void update_projection ( float64_t  alpha,
int32_t  num_vec 
) [protected]

only computes updates on the projection

在文件SubGradientSVM.cpp405行定义。


成员数据文档

uint8_t* active [protected]

0=not active, 1=active, 2=on boundary

在文件SubGradientSVM.h188行定义。

autoselected epsilon

在文件SubGradientSVM.h171行定义。

float64_t* beta [protected]

beta

在文件SubGradientSVM.h230行定义。

float64_t C1 [protected]

C1

在文件SubGradientSVM.h163行定义。

float64_t C2 [protected]

C2

在文件SubGradientSVM.h165行定义。

int32_t delta_active [protected]

delta active

在文件SubGradientSVM.h196行定义。

int32_t delta_bound [protected]

delta bound

在文件SubGradientSVM.h198行定义。

float64_t epsilon [protected]

epsilon

在文件SubGradientSVM.h167行定义。

float64_t grad_b [protected]

grad b

在文件SubGradientSVM.h220行定义。

float64_t* grad_proj [protected]

grad proj

在文件SubGradientSVM.h222行定义。

float64_t* grad_w [protected]

grad w

在文件SubGradientSVM.h218行定义。

int32_t* hinge_idx [protected]

hinge index

在文件SubGradientSVM.h226行定义。

float64_t* hinge_point [protected]

hinge point

在文件SubGradientSVM.h224行定义。

int32_t* idx_active [protected]

idx active

在文件SubGradientSVM.h192行定义。

int32_t* idx_bound [protected]

idx bound

在文件SubGradientSVM.h194行定义。

int32_t last_it_noimprovement [protected]

last iteration no improvement

在文件SubGradientSVM.h182行定义。

int32_t num_it_noimprovement [protected]

number of iterations no improvement

在文件SubGradientSVM.h184行定义。

uint8_t* old_active [protected]

old active

在文件SubGradientSVM.h190行定义。

float64_t* old_beta [protected]

old beta

在文件SubGradientSVM.h232行定义。

float64_t* old_v [protected]

old v

在文件SubGradientSVM.h212行定义。

float64_t* old_Z [protected]

old Z

在文件SubGradientSVM.h240行定义。

float64_t* old_Zv [protected]

old Zv

在文件SubGradientSVM.h236行定义。

float64_t* proj [protected]

proj

在文件SubGradientSVM.h200行定义。

int32_t qpsize [protected]

qpsize

在文件SubGradientSVM.h173行定义。

int32_t qpsize_limit [protected]

limit of qpsize

在文件SubGradientSVM.h177行定义。

int32_t qpsize_max [protected]

maximum qpsize

在文件SubGradientSVM.h175行定义。

float64_t* sum_CXy_active [protected]

sum CXy active

在文件SubGradientSVM.h208行定义。

float64_t sum_Cy_active [protected]

sum Cy active

在文件SubGradientSVM.h214行定义。

float64_t tim [protected]

timing measurement

在文件SubGradientSVM.h243行定义。

float64_t* tmp_proj [protected]

tmp proj

在文件SubGradientSVM.h202行定义。

int32_t* tmp_proj_idx [protected]

tmp proj index

在文件SubGradientSVM.h204行定义。

bool use_bias [protected]

shall bias be used

在文件SubGradientSVM.h179行定义。

float64_t* v [protected]

v

在文件SubGradientSVM.h210行定义。

float64_t work_epsilon [protected]

work epsilon

在文件SubGradientSVM.h169行定义。

float64_t* Z [protected]

Z

在文件SubGradientSVM.h238行定义。

float64_t* Zv [protected]

Zv

在文件SubGradientSVM.h234行定义。


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

SHOGUN Machine Learning Toolbox - Documentation