SHOGUN v0.9.0
|
A generic KernelMachine interface.
A kernel machine is defined as
where is the number of training examples
are the weights assigned to each training example
is the kernel and
the bias.
Using an a-priori choosen kernel, the and bias are determined in a training procedure.
在文件KernelMachine.h第43行定义。
CKernelMachine | ( | ) |
default constructor
在文件KernelMachine.cpp第30行定义。
~CKernelMachine | ( | ) | [virtual] |
destructor
在文件KernelMachine.cpp第53行定义。
CLabels * classify | ( | ) | [virtual] |
classify kernel machine
实现了CClassifier。
被CMultiClassSVM及CKRR重载。
在文件KernelMachine.cpp第92行定义。
classify objects
data | (test)data to be classified |
实现了CClassifier。
被CKRR重载。
在文件KernelMachine.cpp第231行定义。
float64_t classify_example | ( | int32_t | num | ) | [virtual] |
classify one example
num | which example to classify |
重载CClassifier。
被CKernelPerceptron、CMultiClassSVM、CScatterSVM及CKRR重载。
在文件KernelMachine.cpp第211行定义。
void * classify_example_helper | ( | void * | p | ) | [static] |
classify example helper, used in threads
p | params of the thread |
在文件KernelMachine.cpp第248行定义。
bool create_new_model | ( | int32_t | num | ) |
create new model
num | number of alphas and support vectors in new model |
在文件KernelMachine.h第286行定义。
float64_t get_alpha | ( | int32_t | idx | ) |
void get_alphas | ( | float64_t ** | alphas, |
int32_t * | d1 | ||
) |
get all alphas (swig compatible)
alphas | array to contain a copy of the alphas |
d1 | number of alphas in the array |
在文件KernelMachine.h第266行定义。
bool get_batch_computation_enabled | ( | ) |
float64_t get_bias | ( | ) |
bool get_bias_enabled | ( | ) |
CKernel* get_kernel | ( | ) |
bool get_linadd_enabled | ( | ) |
virtual const char* get_name | ( | void | ) | const [virtual] |
Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.
实现了CSGObject。
被CKernelPerceptron、CMKL、CGMNPSVM、CGNPPSVM、CGPBTSVM、CLaRank、CLibSVM、CLibSVMMultiClass、CLibSVMOneClass、CMPDSVM、CScatterSVM、CSVM、CKRR及CLibSVR重载。
在文件KernelMachine.h第57行定义。
int32_t get_num_support_vectors | ( | ) |
int32_t get_support_vector | ( | int32_t | idx | ) |
get support vector at given index
idx | index of support vector |
在文件KernelMachine.h第152行定义。
void get_support_vectors | ( | int32_t ** | svs, |
int32_t * | num | ||
) |
get all support vectors (swig compatible)
svs | array to contain a copy of the support vectors |
num | number of support vectors in the array |
在文件KernelMachine.h第245行定义。
bool init_kernel_optimization | ( | ) |
bool set_alpha | ( | int32_t | idx, |
float64_t | val | ||
) |
set alpha at given index to given value
idx | index of alpha vector |
val | new value of alpha vector |
在文件KernelMachine.h第191行定义。
void set_alphas | ( | float64_t * | alphas, |
int32_t | d | ||
) |
set alphas to given values
alphas | array with all alphas to set |
d | number of alphas (== number of support vectors) |
在文件KernelMachine.h第215行定义。
void set_batch_computation_enabled | ( | bool | enable | ) |
set batch computation enabled
enable | if batch computation shall be enabled |
在文件KernelMachine.h第85行定义。
void set_bias | ( | float64_t | bias | ) |
void set_bias_enabled | ( | bool | enable_bias | ) |
void set_kernel | ( | CKernel * | k | ) |
void set_linadd_enabled | ( | bool | enable | ) |
bool set_support_vector | ( | int32_t | idx, |
int32_t | val | ||
) |
set support vector at given index to given value
idx | index of support vector |
val | new value of support vector |
在文件KernelMachine.h第175行定义。
void set_support_vectors | ( | int32_t * | svs, |
int32_t | d | ||
) |
set support vectors to given values
svs | array with all support vectors to set |
d | number of support vectors |
在文件KernelMachine.h第230行定义。
kernel
在文件KernelMachine.h第343行定义。
array of coefficients alpha
在文件KernelMachine.h第353行定义。
bias term b
在文件KernelMachine.h第351行定义。
int32_t* m_svs [protected] |
array of ``support vectors''
在文件KernelMachine.h第355行定义。
int32_t num_svs [protected] |
number of ``support vectors''
在文件KernelMachine.h第357行定义。
bool use_batch_computation [protected] |
if batch computation is enabled
在文件KernelMachine.h第345行定义。
bool use_bias [protected] |
if bias shall be used
在文件KernelMachine.h第349行定义。
bool use_linadd [protected] |
if linadd is enabled
在文件KernelMachine.h第347行定义。