SHOGUN v0.9.0
|
class WDSVMOcas
在文件WDSVMOcas.h第26行定义。
公有成员 | |
CWDSVMOcas (void) | |
CWDSVMOcas (E_SVM_TYPE type) | |
CWDSVMOcas (float64_t C, int32_t d, int32_t from_d, CStringFeatures< uint8_t > *traindat, CLabels *trainlab) | |
virtual | ~CWDSVMOcas () |
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_epsilon (float64_t eps) |
float64_t | get_epsilon () |
void | set_features (CStringFeatures< uint8_t > *feat) |
CStringFeatures< uint8_t > * | get_features () |
void | set_bias_enabled (bool enable_bias) |
bool | get_bias_enabled () |
void | set_bufsize (int32_t sz) |
int32_t | get_bufsize () |
void | set_degree (int32_t d, int32_t from_d) |
int32_t | get_degree () |
CLabels * | classify () |
virtual CLabels * | classify (CFeatures *data) |
virtual float64_t | classify_example (int32_t num) |
void | set_normalization_const () |
float64_t | get_normalization_const () |
保护成员 | |
int32_t | set_wd_weights () |
virtual const char * | get_name () const |
静态保护成员 | |
static void | compute_W (float64_t *sq_norm_W, float64_t *dp_WoldW, float64_t *alpha, uint32_t nSel, void *ptr) |
static float64_t | update_W (float64_t t, void *ptr) |
static void * | add_new_cut_helper (void *ptr) |
static int | add_new_cut (float64_t *new_col_H, uint32_t *new_cut, uint32_t cut_length, uint32_t nSel, void *ptr) |
static void * | compute_output_helper (void *ptr) |
static int | compute_output (float64_t *output, void *ptr) |
static int | sort (float64_t *vals, float64_t *data, uint32_t size) |
static void | print (ocas_return_value_T value) |
保护属性 | |
CStringFeatures< uint8_t > * | features |
bool | use_bias |
int32_t | bufsize |
float64_t | C1 |
float64_t | C2 |
float64_t | epsilon |
E_SVM_TYPE | method |
int32_t | degree |
int32_t | from_degree |
float32_t * | wd_weights |
int32_t | num_vec |
int32_t | string_length |
int32_t | alphabet_size |
float64_t | normalization_const |
float64_t | bias |
float64_t | old_bias |
int32_t * | w_offsets |
int32_t | w_dim |
int32_t | w_dim_single_char |
float32_t * | w |
float32_t * | old_w |
float64_t * | lab |
float32_t ** | cuts |
float64_t * | cp_bias |
CWDSVMOcas | ( | void | ) |
default constructor
在文件WDSVMOcas.cpp第48行定义。
CWDSVMOcas | ( | E_SVM_TYPE | type | ) |
CWDSVMOcas | ( | float64_t | C, |
int32_t | d, | ||
int32_t | from_d, | ||
CStringFeatures< uint8_t > * | traindat, | ||
CLabels * | trainlab | ||
) |
constructor
C | constant C |
d | degree |
from_d | from degree |
traindat | training features |
trainlab | labels for training features |
在文件WDSVMOcas.cpp第78行定义。
~CWDSVMOcas | ( | ) | [virtual] |
在文件WDSVMOcas.cpp第95行定义。
int add_new_cut | ( | float64_t * | new_col_H, |
uint32_t * | new_cut, | ||
uint32_t | cut_length, | ||
uint32_t | nSel, | ||
void * | ptr | ||
) | [static, protected] |
add new cut
new_col_H | new col H |
new_cut | new cut |
cut_length | length of cut |
nSel | nSel |
ptr | ptr |
在文件WDSVMOcas.cpp第346行定义。
void * add_new_cut_helper | ( | void * | ptr | ) | [static, protected] |
classify objects
data | (test)data to be classified |
实现了CClassifier。
在文件WDSVMOcas.cpp第121行定义。
CLabels * classify | ( | ) | [virtual] |
virtual float64_t classify_example | ( | int32_t | num | ) | [virtual] |
classify one example
num | number of example to classify |
重载CClassifier。
在文件WDSVMOcas.h第179行定义。
int compute_output | ( | float64_t * | output, |
void * | ptr | ||
) | [static, protected] |
void * compute_output_helper | ( | void * | ptr | ) | [static, protected] |
void compute_W | ( | float64_t * | sq_norm_W, |
float64_t * | dp_WoldW, | ||
float64_t * | alpha, | ||
uint32_t | nSel, | ||
void * | ptr | ||
) | [static, protected] |
compute W
sq_norm_W | square normed W |
dp_WoldW | dp W old W |
alpha | alpha |
nSel | nSel |
ptr | ptr |
在文件WDSVMOcas.cpp第607行定义。
bool get_bias_enabled | ( | ) |
int32_t get_bufsize | ( | ) |
float64_t get_C1 | ( | ) |
float64_t get_C2 | ( | ) |
virtual EClassifierType get_classifier_type | ( | ) | [virtual] |
int32_t get_degree | ( | ) |
float64_t get_epsilon | ( | ) |
CStringFeatures<uint8_t>* get_features | ( | ) |
virtual const char* get_name | ( | void | ) | const [protected, virtual] |
float64_t get_normalization_const | ( | ) |
static void print | ( | ocas_return_value_T | value | ) | [static, protected] |
print nothing
在文件WDSVMOcas.h第295行定义。
void set_bias_enabled | ( | bool | enable_bias | ) |
void set_bufsize | ( | int32_t | sz | ) |
set C
c_neg | new C constant for negatively labeled examples |
c_pos | new C constant for positively labeled examples |
在文件WDSVMOcas.h第73行定义。
void set_degree | ( | int32_t | d, |
int32_t | from_d | ||
) |
void set_epsilon | ( | float64_t | eps | ) |
void set_features | ( | CStringFeatures< uint8_t > * | feat | ) |
void set_normalization_const | ( | ) |
set normalization const
在文件WDSVMOcas.h第208行定义。
int32_t set_wd_weights | ( | ) | [protected] |
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) |
重载CClassifier。
在文件WDSVMOcas.cpp第154行定义。
int32_t alphabet_size [protected] |
size of alphabet
在文件WDSVMOcas.h第331行定义。
bias
在文件WDSVMOcas.h第337行定义。
int32_t bufsize [protected] |
buffer size
在文件WDSVMOcas.h第310行定义。
C1
在文件WDSVMOcas.h第312行定义。
C2
在文件WDSVMOcas.h第314行定义。
bias dimensions
在文件WDSVMOcas.h第356行定义。
cuts
在文件WDSVMOcas.h第354行定义。
int32_t degree [protected] |
degree
在文件WDSVMOcas.h第321行定义。
epsilon
在文件WDSVMOcas.h第316行定义。
CStringFeatures<uint8_t>* features [protected] |
features
在文件WDSVMOcas.h第306行定义。
int32_t from_degree [protected] |
from degree
在文件WDSVMOcas.h第323行定义。
labels
在文件WDSVMOcas.h第351行定义。
E_SVM_TYPE method [protected] |
method
在文件WDSVMOcas.h第318行定义。
float64_t normalization_const [protected] |
normalization const
在文件WDSVMOcas.h第334行定义。
int32_t num_vec [protected] |
num vectors
在文件WDSVMOcas.h第327行定义。
old_bias
在文件WDSVMOcas.h第339行定义。
old w
在文件WDSVMOcas.h第349行定义。
int32_t string_length [protected] |
length of string in vector
在文件WDSVMOcas.h第329行定义。
bool use_bias [protected] |
if bias shall be used
在文件WDSVMOcas.h第308行定义。
w
在文件WDSVMOcas.h第347行定义。
int32_t w_dim [protected] |
w dim
在文件WDSVMOcas.h第343行定义。
int32_t w_dim_single_char [protected] |
w dim of a single char
在文件WDSVMOcas.h第345行定义。
int32_t* w_offsets [protected] |
w offsets
在文件WDSVMOcas.h第341行定义。
float32_t* wd_weights [protected] |
wd weights
在文件WDSVMOcas.h第325行定义。