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第35行定义。
~CKernelMachine | ( | ) | [virtual] |
destructor
在文件KernelMachine.cpp第44行定义。
classify objects
data | (test)data to be classified |
实现了CClassifier。
被CKRR重载。
在文件KernelMachine.cpp第222行定义。
CLabels * classify | ( | ) | [virtual] |
classify kernel machine
实现了CClassifier。
被CMultiClassSVM及CKRR重载。
在文件KernelMachine.cpp第83行定义。
float64_t classify_example | ( | int32_t | num | ) | [virtual] |
classify one example
num | which example to classify |
重载CClassifier。
被CKernelPerceptron、CMultiClassSVM、CScatterSVM及CKRR重载。
在文件KernelMachine.cpp第202行定义。
void * classify_example_helper | ( | void * | p | ) | [static] |
classify example helper, used in threads
p | params of the thread |
在文件KernelMachine.cpp第239行定义。
bool create_new_model | ( | int32_t | num | ) |
create new model
num | number of alphas and support vectors in new model |
在文件KernelMachine.h第278行定义。
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第258行定义。
bool get_batch_computation_enabled | ( | ) |
float64_t get_bias | ( | ) |
bool get_bias_enabled | ( | ) |
CKernel* get_kernel | ( | ) |
bool get_linadd_enabled | ( | ) |
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第144行定义。
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第237行定义。
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第183行定义。
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第207行定义。
void set_batch_computation_enabled | ( | bool | enable | ) |
set batch computation enabled
enable | if batch computation shall be enabled |
在文件KernelMachine.h第77行定义。
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第167行定义。
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第222行定义。
kernel
在文件KernelMachine.h第426行定义。
array of coefficients alpha
在文件KernelMachine.h第436行定义。
bias term b
在文件KernelMachine.h第434行定义。
int32_t* m_svs [protected] |
array of ``support vectors''
在文件KernelMachine.h第438行定义。
int32_t num_svs [protected] |
number of ``support vectors''
在文件KernelMachine.h第440行定义。
bool use_batch_computation [protected] |
if batch computation is enabled
在文件KernelMachine.h第428行定义。
bool use_bias [protected] |
if bias shall be used
在文件KernelMachine.h第432行定义。
bool use_linadd [protected] |
if linadd is enabled
在文件KernelMachine.h第430行定义。