SHOGUN v0.9.0
|
class SubGradientSVM
在文件SubGradientSVM.h第23行定义。
公有成员 | |
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_t * | proj |
float64_t * | tmp_proj |
int32_t * | tmp_proj_idx |
float64_t * | sum_CXy_active |
float64_t * | v |
float64_t * | old_v |
float64_t | sum_Cy_active |
float64_t * | grad_w |
float64_t | grad_b |
float64_t * | grad_proj |
float64_t * | hinge_point |
int32_t * | hinge_idx |
float64_t * | beta |
float64_t * | old_beta |
float64_t * | Zv |
float64_t * | old_Zv |
float64_t * | Z |
float64_t * | old_Z |
float64_t | tim |
CSubGradientSVM | ( | ) |
default constructor
在文件SubGradientSVM.cpp第26行定义。
CSubGradientSVM | ( | float64_t | C, |
CDotFeatures * | traindat, | ||
CLabels * | trainlab | ||
) |
constructor
C | constant C |
traindat | training features |
trainlab | labels for training features |
在文件SubGradientSVM.cpp第32行定义。
~CSubGradientSVM | ( | ) | [virtual] |
在文件SubGradientSVM.cpp第42行定义。
void cleanup | ( | ) | [protected] |
de-alloc helper arrays
在文件SubGradientSVM.cpp第493行定义。
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.cpp第288行定义。
float64_t compute_objective | ( | int32_t | num_feat, |
int32_t | num_vec | ||
) | [protected] |
compute svm objective
在文件SubGradientSVM.cpp第392行定义。
void compute_projection | ( | int32_t | num_feat, |
int32_t | num_vec | ||
) | [protected] |
compute projection
在文件SubGradientSVM.cpp第405行定义。
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.cpp第79行定义。
bool get_bias_enabled | ( | ) |
float64_t get_C1 | ( | ) |
float64_t get_C2 | ( | ) |
virtual EClassifierType get_classifier_type | ( | ) | [virtual] |
float64_t get_epsilon | ( | ) |
virtual const char* get_name | ( | void | ) | const [protected, virtual] |
int32_t get_qpsize | ( | ) |
int32_t get_qpsize_max | ( | ) |
void init | ( | int32_t | num_vec, |
int32_t | num_feat | ||
) | [protected] |
alloc helper arrays
在文件SubGradientSVM.cpp第416行定义。
float64_t line_search | ( | int32_t | num_feat, |
int32_t | num_vec | ||
) | [protected] |
performs a line search to determine step size
在文件SubGradientSVM.cpp第222行定义。
void set_bias_enabled | ( | bool | enable_bias | ) |
void set_epsilon | ( | float64_t | eps | ) |
void set_qpsize | ( | int32_t | q | ) |
void set_qpsize_max | ( | int32_t | q | ) |
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) |
重载CClassifier。
在文件SubGradientSVM.cpp第530行定义。
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.cpp第201行定义。
void update_projection | ( | float64_t | alpha, |
int32_t | num_vec | ||
) | [protected] |
only computes updates on the projection
在文件SubGradientSVM.cpp第411行定义。
uint8_t* active [protected] |
0=not active, 1=active, 2=on boundary
在文件SubGradientSVM.h第189行定义。
float64_t autoselected_epsilon [protected] |
autoselected epsilon
在文件SubGradientSVM.h第172行定义。
beta
在文件SubGradientSVM.h第231行定义。
C1
在文件SubGradientSVM.h第164行定义。
C2
在文件SubGradientSVM.h第166行定义。
int32_t delta_active [protected] |
delta active
在文件SubGradientSVM.h第197行定义。
int32_t delta_bound [protected] |
delta bound
在文件SubGradientSVM.h第199行定义。
epsilon
在文件SubGradientSVM.h第168行定义。
grad b
在文件SubGradientSVM.h第221行定义。
grad proj
在文件SubGradientSVM.h第223行定义。
grad w
在文件SubGradientSVM.h第219行定义。
int32_t* hinge_idx [protected] |
hinge index
在文件SubGradientSVM.h第227行定义。
float64_t* hinge_point [protected] |
hinge point
在文件SubGradientSVM.h第225行定义。
int32_t* idx_active [protected] |
idx active
在文件SubGradientSVM.h第193行定义。
int32_t* idx_bound [protected] |
idx bound
在文件SubGradientSVM.h第195行定义。
int32_t last_it_noimprovement [protected] |
last iteration no improvement
在文件SubGradientSVM.h第183行定义。
int32_t num_it_noimprovement [protected] |
number of iterations no improvement
在文件SubGradientSVM.h第185行定义。
uint8_t* old_active [protected] |
old active
在文件SubGradientSVM.h第191行定义。
old beta
在文件SubGradientSVM.h第233行定义。
old v
在文件SubGradientSVM.h第213行定义。
old Z
在文件SubGradientSVM.h第241行定义。
old Zv
在文件SubGradientSVM.h第237行定义。
proj
在文件SubGradientSVM.h第201行定义。
int32_t qpsize [protected] |
qpsize
在文件SubGradientSVM.h第174行定义。
int32_t qpsize_limit [protected] |
limit of qpsize
在文件SubGradientSVM.h第178行定义。
int32_t qpsize_max [protected] |
maximum qpsize
在文件SubGradientSVM.h第176行定义。
float64_t* sum_CXy_active [protected] |
sum CXy active
在文件SubGradientSVM.h第209行定义。
float64_t sum_Cy_active [protected] |
sum Cy active
在文件SubGradientSVM.h第215行定义。
timing measurement
在文件SubGradientSVM.h第244行定义。
tmp proj
在文件SubGradientSVM.h第203行定义。
int32_t* tmp_proj_idx [protected] |
tmp proj index
在文件SubGradientSVM.h第205行定义。
bool use_bias [protected] |
shall bias be used
在文件SubGradientSVM.h第180行定义。
v
在文件SubGradientSVM.h第211行定义。
float64_t work_epsilon [protected] |
work epsilon
在文件SubGradientSVM.h第170行定义。
Z
在文件SubGradientSVM.h第239行定义。
Zv
在文件SubGradientSVM.h第235行定义。