公有成员 | 保护成员 | 静态保护成员 | 保护属性

CWDSVMOcas类参考


详细描述

class WDSVMOcas

在文件WDSVMOcas.h26行定义。

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

所有成员的列表。

公有成员

 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 ()
CLabelsclassify ()
virtual CLabelsclassify (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 void 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 void compute_output (float64_t *output, void *ptr)
static void sort (float64_t *vals, uint32_t *idx, uint32_t size)

保护属性

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_twd_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_tw
float32_told_w
float64_tlab
float32_t ** cuts
float64_tcp_bias

构造及析构函数文档

CWDSVMOcas ( E_SVM_TYPE  type  ) 

constructor

参数:
type type of SVM

在文件WDSVMOcas.cpp48行定义。

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

~CWDSVMOcas (  )  [virtual]

在文件WDSVMOcas.cpp79行定义。


成员函数文档

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

void * add_new_cut_helper ( void *  ptr  )  [static, protected]

helper function for adding a new cut

参数:
ptr 
返回:
ptr

在文件WDSVMOcas.cpp277行定义。

CLabels * classify ( CFeatures data  )  [virtual]

classify objects

参数:
data (test)data to be classified
返回:
classified labels

实现了CClassifier

在文件WDSVMOcas.cpp105行定义。

CLabels * classify (  )  [virtual]

classify all examples

返回:
resulting labels

实现了CClassifier

在文件WDSVMOcas.cpp83行定义。

virtual float64_t classify_example ( int32_t  num  )  [virtual]

classify one example

参数:
num number of example to classify
返回:
classified result

重载CClassifier

在文件WDSVMOcas.h176行定义。

void compute_output ( float64_t output,
void *  ptr 
) [static, protected]

compute output

参数:
output output
ptr ptr

在文件WDSVMOcas.cpp517行定义。

void * compute_output_helper ( void *  ptr  )  [static, protected]

helper function for computing the output

参数:
ptr 
返回:
ptr

在文件WDSVMOcas.cpp425行定义。

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

bool get_bias_enabled (  ) 

check if bias is enabled

返回:
if bias is enabled

在文件WDSVMOcas.h127行定义。

int32_t get_bufsize (  ) 

get buffer size

返回:
buffer size

在文件WDSVMOcas.h139行定义。

float64_t get_C1 (  ) 

get C1

返回:
C1

在文件WDSVMOcas.h76行定义。

float64_t get_C2 (  ) 

get C2

返回:
C2

在文件WDSVMOcas.h82行定义。

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

返回:
classifier type WDSVMOCAS

重载CClassifier

在文件WDSVMOcas.h52行定义。

int32_t get_degree (  ) 

get degree

返回:
degree

在文件WDSVMOcas.h156行定义。

float64_t get_epsilon (  ) 

get epsilon

返回:
epsilon

在文件WDSVMOcas.h94行定义。

CStringFeatures<uint8_t>* get_features (  ) 

get features

返回:
features

在文件WDSVMOcas.h111行定义。

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

实现了CSGObject

在文件WDSVMOcas.h292行定义。

float64_t get_normalization_const (  ) 

get normalization const

返回:
normalization const

在文件WDSVMOcas.h220行定义。

void set_bias_enabled ( bool  enable_bias  ) 

set if bias shall be enabled

参数:
enable_bias if bias shall be enabled

在文件WDSVMOcas.h121行定义。

void set_bufsize ( int32_t  sz  ) 

set buffer size

参数:
sz buffer size

在文件WDSVMOcas.h133行定义。

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

在文件WDSVMOcas.h70行定义。

void set_degree ( int32_t  d,
int32_t  from_d 
)

set degree

参数:
d degree
from_d from degree

在文件WDSVMOcas.h146行定义。

void set_epsilon ( float64_t  eps  ) 

set epsilon

参数:
eps new epsilon

在文件WDSVMOcas.h88行定义。

void set_features ( CStringFeatures< uint8_t > *  feat  ) 

set features

参数:
feat features to set

在文件WDSVMOcas.h100行定义。

void set_normalization_const (  ) 

set normalization const

在文件WDSVMOcas.h205行定义。

int32_t set_wd_weights (  )  [protected]

set wd weights

返回:
w_dim_single_c

在文件WDSVMOcas.cpp120行定义。

void sort ( float64_t vals,
uint32_t *  idx,
uint32_t  size 
) [static, protected]

sort

参数:
vals vals
idx idx
size size

在文件WDSVMOcas.cpp415行定义。

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

在文件WDSVMOcas.cpp138行定义。

float64_t update_W ( float64_t  t,
void *  ptr 
) [static, protected]

update W

参数:
t t
ptr ptr
返回:
something floaty

在文件WDSVMOcas.cpp244行定义。


成员数据文档

int32_t alphabet_size [protected]

size of alphabet

在文件WDSVMOcas.h321行定义。

float64_t bias [protected]

bias

在文件WDSVMOcas.h327行定义。

int32_t bufsize [protected]

buffer size

在文件WDSVMOcas.h300行定义。

float64_t C1 [protected]

C1

在文件WDSVMOcas.h302行定义。

float64_t C2 [protected]

C2

在文件WDSVMOcas.h304行定义。

float64_t* cp_bias [protected]

bias dimensions

在文件WDSVMOcas.h346行定义。

float32_t** cuts [protected]

cuts

在文件WDSVMOcas.h344行定义。

int32_t degree [protected]

degree

在文件WDSVMOcas.h311行定义。

float64_t epsilon [protected]

epsilon

在文件WDSVMOcas.h306行定义。

CStringFeatures<uint8_t>* features [protected]

features

在文件WDSVMOcas.h296行定义。

int32_t from_degree [protected]

from degree

在文件WDSVMOcas.h313行定义。

float64_t* lab [protected]

labels

在文件WDSVMOcas.h341行定义。

E_SVM_TYPE method [protected]

method

在文件WDSVMOcas.h308行定义。

normalization const

在文件WDSVMOcas.h324行定义。

int32_t num_vec [protected]

num vectors

在文件WDSVMOcas.h317行定义。

float64_t old_bias [protected]

old_bias

在文件WDSVMOcas.h329行定义。

float32_t* old_w [protected]

old w

在文件WDSVMOcas.h339行定义。

int32_t string_length [protected]

length of string in vector

在文件WDSVMOcas.h319行定义。

bool use_bias [protected]

if bias shall be used

在文件WDSVMOcas.h298行定义。

float32_t* w [protected]

w

在文件WDSVMOcas.h337行定义。

int32_t w_dim [protected]

w dim

在文件WDSVMOcas.h333行定义。

int32_t w_dim_single_char [protected]

w dim of a single char

在文件WDSVMOcas.h335行定义。

int32_t* w_offsets [protected]

w offsets

在文件WDSVMOcas.h331行定义。

float32_t* wd_weights [protected]

wd weights

在文件WDSVMOcas.h315行定义。


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

SHOGUN Machine Learning Toolbox - Documentation