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

CKernelMachine类参考


详细描述

A generic KernelMachine interface.

A kernel machine is defined as

\[ f({\bf x})=\sum_{i=0}^{N-1} \alpha_i k({\bf x}, {\bf x_i})+b \]

where $N$ is the number of training examples $\alpha_i$ are the weights assigned to each training example $k(x,x')$ is the kernel and $b$ the bias.

Using an a-priori choosen kernel, the $\alpha_i$ and bias are determined in a training procedure.

在文件KernelMachine.h43行定义。

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

所有成员的列表。

公有成员

 CKernelMachine ()
virtual ~CKernelMachine ()
void set_kernel (CKernel *k)
CKernelget_kernel ()
void set_batch_computation_enabled (bool enable)
bool get_batch_computation_enabled ()
void set_linadd_enabled (bool enable)
bool get_linadd_enabled ()
void set_bias_enabled (bool enable_bias)
bool get_bias_enabled ()
float64_t get_bias ()
void set_bias (float64_t bias)
int32_t get_support_vector (int32_t idx)
float64_t get_alpha (int32_t idx)
bool set_support_vector (int32_t idx, int32_t val)
bool set_alpha (int32_t idx, float64_t val)
int32_t get_num_support_vectors ()
void set_alphas (float64_t *alphas, int32_t d)
void set_support_vectors (int32_t *svs, int32_t d)
void get_support_vectors (int32_t **svs, int32_t *num)
void get_alphas (float64_t **alphas, int32_t *d1)
bool create_new_model (int32_t num)
bool init_kernel_optimization ()
virtual CLabelsclassify ()
virtual CLabelsclassify (CFeatures *data)
virtual float64_t classify_example (int32_t num)

静态公有成员

static void * classify_example_helper (void *p)

保护属性

CKernelkernel
bool use_batch_computation
bool use_linadd
bool use_bias
float64_t m_bias
float64_tm_alpha
int32_t * m_svs
int32_t num_svs

构造及析构函数文档

CKernelMachine (  ) 

default constructor

在文件KernelMachine.cpp35行定义。

~CKernelMachine (  )  [virtual]

destructor

在文件KernelMachine.cpp44行定义。


成员函数文档

CLabels * classify (  )  [virtual]

classify kernel machine

返回:
result labels

实现了CClassifier

CMultiClassSVMCKRR重载。

在文件KernelMachine.cpp83行定义。

CLabels * classify ( CFeatures data  )  [virtual]

classify objects

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

实现了CClassifier

CKRR重载。

在文件KernelMachine.cpp222行定义。

float64_t classify_example ( int32_t  num  )  [virtual]

classify one example

参数:
num which example to classify
返回:
classified value

重载CClassifier

CKernelPerceptronCMultiClassSVMCScatterSVMCKRR重载。

在文件KernelMachine.cpp202行定义。

void * classify_example_helper ( void *  p  )  [static]

classify example helper, used in threads

参数:
p params of the thread
返回:
nothing really

在文件KernelMachine.cpp239行定义。

bool create_new_model ( int32_t  num  ) 

create new model

参数:
num number of alphas and support vectors in new model

在文件KernelMachine.h278行定义。

float64_t get_alpha ( int32_t  idx  ) 

get alpha at given index

参数:
idx index of alpha
返回:
alpha

在文件KernelMachine.h155行定义。

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

bool get_batch_computation_enabled (  ) 

check if batch computation is enabled

返回:
if batch computation is enabled

在文件KernelMachine.h86行定义。

float64_t get_bias (  ) 

get bias

返回:
bias

在文件KernelMachine.h125行定义。

bool get_bias_enabled (  ) 

get state of bias

返回:
state of bias

在文件KernelMachine.h119行定义。

CKernel* get_kernel (  ) 

get kernel

返回:
kernel

在文件KernelMachine.h67行定义。

bool get_linadd_enabled (  ) 

check if linadd is enabled

返回:
if linadd is enabled

在文件KernelMachine.h104行定义。

int32_t get_num_support_vectors (  ) 

get number of support vectors

返回:
number of support vectors

在文件KernelMachine.h197行定义。

int32_t get_support_vector ( int32_t  idx  ) 

get support vector at given index

参数:
idx index of support vector
返回:
support vector

在文件KernelMachine.h144行定义。

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

bool init_kernel_optimization (  ) 

initialise kernel optimisation

返回:
if operation was successful

在文件KernelMachine.cpp52行定义。

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
返回:
if operation was successful

在文件KernelMachine.h183行定义。

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

void set_batch_computation_enabled ( bool  enable  ) 

set batch computation enabled

参数:
enable if batch computation shall be enabled

在文件KernelMachine.h77行定义。

void set_bias ( float64_t  bias  ) 

set bias to given value

参数:
bias new bias

在文件KernelMachine.h134行定义。

void set_bias_enabled ( bool  enable_bias  ) 

set state of bias

参数:
enable_bias if bias shall be enabled

在文件KernelMachine.h113行定义。

void set_kernel ( CKernel k  ) 

set kernel

参数:
k kernel

在文件KernelMachine.h56行定义。

void set_linadd_enabled ( bool  enable  ) 

set linadd enabled

参数:
enable if linadd shall be enabled

在文件KernelMachine.h95行定义。

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
返回:
if operation was successful

在文件KernelMachine.h167行定义。

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


成员数据文档

CKernel* kernel [protected]

kernel

在文件KernelMachine.h426行定义。

float64_t* m_alpha [protected]

array of coefficients alpha

在文件KernelMachine.h436行定义。

float64_t m_bias [protected]

bias term b

在文件KernelMachine.h434行定义。

int32_t* m_svs [protected]

array of ``support vectors''

在文件KernelMachine.h438行定义。

int32_t num_svs [protected]

number of ``support vectors''

在文件KernelMachine.h440行定义。

bool use_batch_computation [protected]

if batch computation is enabled

在文件KernelMachine.h428行定义。

bool use_bias [protected]

if bias shall be used

在文件KernelMachine.h432行定义。

bool use_linadd [protected]

if linadd is enabled

在文件KernelMachine.h430行定义。


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

SHOGUN Machine Learning Toolbox - Documentation