SHOGUN v0.9.0
公有成员 | 保护成员 | 保护属性
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 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 ()
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

构造及析构函数文档

default constructor

在文件SubGradientSVM.cpp26行定义。

CSubGradientSVM ( float64_t  C,
CDotFeatures traindat,
CLabels trainlab 
)

constructor

参数:
Cconstant C
traindattraining features
trainlablabels for training features

在文件SubGradientSVM.cpp32行定义。

~CSubGradientSVM ( ) [virtual]

在文件SubGradientSVM.cpp42行定义。


成员函数文档

void cleanup ( ) [protected]

de-alloc helper arrays

在文件SubGradientSVM.cpp493行定义。

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.cpp392行定义。

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

compute projection

在文件SubGradientSVM.cpp405行定义。

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.h86行定义。

float64_t get_C1 ( )

get C1

返回:
C1

在文件SubGradientSVM.h68行定义。

float64_t get_C2 ( )

get C2

返回:
C2

在文件SubGradientSVM.h74行定义。

virtual EClassifierType get_classifier_type ( ) [virtual]

get classifier type

返回:
classifier type SUBGRADIENTSVM

重载CClassifier

在文件SubGradientSVM.h44行定义。

float64_t get_epsilon ( )

get epsilon

返回:
epsilon

在文件SubGradientSVM.h98行定义。

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

重载CLinearClassifier

在文件SubGradientSVM.h160行定义。

int32_t get_qpsize ( )

get qpsize

返回:
qpsize

在文件SubGradientSVM.h110行定义。

int32_t get_qpsize_max ( )

get qpsize_max

返回:
qpsize_max

在文件SubGradientSVM.h122行定义。

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

alloc helper arrays

在文件SubGradientSVM.cpp416行定义。

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_biasif bias shall be enabled

在文件SubGradientSVM.h80行定义。

void set_C ( float64_t  c_neg,
float64_t  c_pos 
)

set C

参数:
c_negC1
c_posC2

在文件SubGradientSVM.h61行定义。

void set_epsilon ( float64_t  eps)

set epsilon

参数:
epsnew epsilon

在文件SubGradientSVM.h92行定义。

void set_qpsize ( int32_t  q)

set qpsize

参数:
qnew qpsize

在文件SubGradientSVM.h104行定义。

void set_qpsize_max ( int32_t  q)

set qpsize_max

参数:
qnew qpsize_max

在文件SubGradientSVM.h116行定义。

bool train ( CFeatures data = NULL) [virtual]

train SVM classifier

参数:
datatraining 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.cpp530行定义。

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.cpp411行定义。


成员数据文档

uint8_t* active [protected]

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

在文件SubGradientSVM.h189行定义。

autoselected epsilon

在文件SubGradientSVM.h172行定义。

float64_t* beta [protected]

beta

在文件SubGradientSVM.h231行定义。

float64_t C1 [protected]

C1

在文件SubGradientSVM.h164行定义。

float64_t C2 [protected]

C2

在文件SubGradientSVM.h166行定义。

int32_t delta_active [protected]

delta active

在文件SubGradientSVM.h197行定义。

int32_t delta_bound [protected]

delta bound

在文件SubGradientSVM.h199行定义。

float64_t epsilon [protected]

epsilon

在文件SubGradientSVM.h168行定义。

float64_t grad_b [protected]

grad b

在文件SubGradientSVM.h221行定义。

float64_t* grad_proj [protected]

grad proj

在文件SubGradientSVM.h223行定义。

float64_t* grad_w [protected]

grad w

在文件SubGradientSVM.h219行定义。

int32_t* hinge_idx [protected]

hinge index

在文件SubGradientSVM.h227行定义。

float64_t* hinge_point [protected]

hinge point

在文件SubGradientSVM.h225行定义。

int32_t* idx_active [protected]

idx active

在文件SubGradientSVM.h193行定义。

int32_t* idx_bound [protected]

idx bound

在文件SubGradientSVM.h195行定义。

int32_t last_it_noimprovement [protected]

last iteration no improvement

在文件SubGradientSVM.h183行定义。

int32_t num_it_noimprovement [protected]

number of iterations no improvement

在文件SubGradientSVM.h185行定义。

uint8_t* old_active [protected]

old active

在文件SubGradientSVM.h191行定义。

float64_t* old_beta [protected]

old beta

在文件SubGradientSVM.h233行定义。

float64_t* old_v [protected]

old v

在文件SubGradientSVM.h213行定义。

float64_t* old_Z [protected]

old Z

在文件SubGradientSVM.h241行定义。

float64_t* old_Zv [protected]

old Zv

在文件SubGradientSVM.h237行定义。

float64_t* proj [protected]

proj

在文件SubGradientSVM.h201行定义。

int32_t qpsize [protected]

qpsize

在文件SubGradientSVM.h174行定义。

int32_t qpsize_limit [protected]

limit of qpsize

在文件SubGradientSVM.h178行定义。

int32_t qpsize_max [protected]

maximum qpsize

在文件SubGradientSVM.h176行定义。

float64_t* sum_CXy_active [protected]

sum CXy active

在文件SubGradientSVM.h209行定义。

float64_t sum_Cy_active [protected]

sum Cy active

在文件SubGradientSVM.h215行定义。

float64_t tim [protected]

timing measurement

在文件SubGradientSVM.h244行定义。

float64_t* tmp_proj [protected]

tmp proj

在文件SubGradientSVM.h203行定义。

int32_t* tmp_proj_idx [protected]

tmp proj index

在文件SubGradientSVM.h205行定义。

bool use_bias [protected]

shall bias be used

在文件SubGradientSVM.h180行定义。

float64_t* v [protected]

v

在文件SubGradientSVM.h211行定义。

float64_t work_epsilon [protected]

work epsilon

在文件SubGradientSVM.h170行定义。

float64_t* Z [protected]

Z

在文件SubGradientSVM.h239行定义。

float64_t* Zv [protected]

Zv

在文件SubGradientSVM.h235行定义。


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

SHOGUN Machine Learning Toolbox - Documentation