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

CMKLMultiClass类参考


详细描述

MKLMultiClass is a class for L1-norm multiclass MKL.

It is based on the GMNPSVM Multiclass SVM. Its own parameters are the L2 norm weight change based MKL Its termination criterion set by void set_mkl_epsilon(float64_t eps ); and the maximal number of MKL iterations set by void set_max_num_mkliters(int32_t maxnum); It passes the regularization constants C1 and C2 to GMNPSVM.

在文件MKLMultiClass.h32行定义。

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

所有成员的列表。

公有成员

 CMKLMultiClass ()
 CMKLMultiClass (float64_t C, CKernel *k, CLabels *lab)
virtual ~CMKLMultiClass ()
virtual bool train (CFeatures *data=NULL)
virtual EClassifierType get_classifier_type ()
float64_tgetsubkernelweights (int32_t &numweights)
void set_mkl_epsilon (float64_t eps)
void set_max_num_mkliters (int32_t maxnum)
virtual void set_mkl_norm (float64_t norm)

保护成员

 CMKLMultiClass (const CMKLMultiClass &cm)
CMKLMultiClass operator= (const CMKLMultiClass &cm)
void initlpsolver ()
void initsvm ()
virtual bool evaluatefinishcriterion (const int32_t numberofsilpiterations)
void addingweightsstep (const std::vector< float64_t > &curweights)
float64_t getsumofsignfreealphas ()
float64_t getsquarenormofprimalcoefficients (const int32_t ind)

保护属性

CGMNPSVMsvm
MKLMultiClassOptimizationBaselpw
::std::vector< std::vector
< float64_t > > 
weightshistory
float64_t mkl_eps
int32_t max_num_mkl_iters
float64_t pnorm
std::vector< float64_tnormweightssquared

构造及析构函数文档

Class default Constructor

在文件MKLMultiClass.cpp17行定义。

CMKLMultiClass ( float64_t  C,
CKernel k,
CLabels lab 
)

Class Constructor commonly used in Shogun Toolbox

参数:
Cconstant C
kkernel
lablabels

在文件MKLMultiClass.cpp28行定义。

~CMKLMultiClass (  ) [virtual]

Class default Destructor

在文件MKLMultiClass.cpp40行定义。

CMKLMultiClass ( const CMKLMultiClass cm ) [protected]

Class Copy Constructor protected to avoid its usage

在文件MKLMultiClass.cpp48行定义。


成员函数文档

void addingweightsstep ( const std::vector< float64_t > &  curweights ) [protected]

adds a constraint to the LP used in MKL

参数:
curweightsare the current MKL weights

it uses void addingweightsstep( const std::vector<float64_t> & curweights); and float64_t getsumofsignfreealphas();

在文件MKLMultiClass.cpp214行定义。

bool evaluatefinishcriterion ( const int32_t  numberofsilpiterations ) [protected, virtual]

checks MKL for convergence

参数:
numberofsilpiterationsis the number of currently done iterations

在文件MKLMultiClass.cpp138行定义。

virtual EClassifierType get_classifier_type (  ) [virtual]

get classifier type

返回:
classifier type GMNPMKL

重载CClassifier

在文件MKLMultiClass.h66行定义。

float64_t getsquarenormofprimalcoefficients ( const int32_t  ind ) [protected]

computes the second svm-dependent part used for generating MKL constraints

参数:
indis the index of the kernel for which to compute $ \|w \|^2 $

在文件MKLMultiClass.cpp300行定义。

float64_t * getsubkernelweights ( int32_t &  numweights )

returns MKL weights for the different kernels

参数:
numweightsis output parameter, is set to zero if no weights have been computed or to the number of MKL weights which is equal to the number of kernels
返回:
NULL if no weights have been computed or otherwise an array with the weights, caller has to delete[] the output by itself

在文件MKLMultiClass.cpp414行定义。

float64_t getsumofsignfreealphas (  ) [protected]

computes the first svm-dependent part used for generating MKL constraints it is $ \sum_y b_y^2-\sum_i \sum_{ y | y \neq y_i} \alpha_{iy}(b_{y_i}-b_y-1) $

在文件MKLMultiClass.cpp250行定义。

void initlpsolver (  ) [protected]

performs some sanity checks (on the provided kernel), inits the GLPK-based LP solver

在文件MKLMultiClass.cpp99行定义。

void initsvm (  ) [protected]

inits the underlying Multiclass SVM

在文件MKLMultiClass.cpp67行定义。

CMKLMultiClass operator= ( const CMKLMultiClass cm ) [protected]

Class Assignment operator protected to avoid its usage

在文件MKLMultiClass.cpp58行定义。

void set_max_num_mkliters ( int32_t  maxnum )

sets maximal number of MKL iterations

参数:
maxnumis the desired maximal number of MKL iterations; when it is reached the MKL terminates irrespective of the MKL progress set it to a nonpositive value in order to turn it off

在文件MKLMultiClass.cpp435行定义。

void set_mkl_epsilon ( float64_t  eps )

sets MKL termination threshold

参数:
epsis the desired threshold value the termination criterion is the L2 norm between the current MKL weights and their counterpart from the previous iteration

在文件MKLMultiClass.cpp430行定义。

void set_mkl_norm ( float64_t  norm ) [virtual]

在文件MKLMultiClass.cpp440行定义。

bool train ( CFeatures data = NULL ) [virtual]

train Multiclass MKL classifier

参数:
datatraining 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

在文件MKLMultiClass.cpp336行定义。


成员数据文档

the solver wrapper

在文件MKLMultiClass.h172行定义。

int32_t max_num_mkl_iters [protected]

maximal number of MKL iterations is set by void set_max_num_mkliters(int32_t maxnum);

在文件MKLMultiClass.h185行定义。

float64_t mkl_eps [protected]

MKL termination threshold is set void set_mkl_epsilon(float64_t eps );

在文件MKLMultiClass.h181行定义。

std::vector<float64_t> normweightssquared [protected]

stores the term \| w_l \|^2 ~~~ "alpha o Y K_l Y o alpha"

在文件MKLMultiClass.h193行定义。

float64_t pnorm [protected]

MKL norm >=1

在文件MKLMultiClass.h189行定义。

CGMNPSVM* svm [protected]

the multiclass svm for fixed MKL weights

在文件MKLMultiClass.h168行定义。

::std::vector< std::vector< float64_t> > weightshistory [protected]

stores the last two mkl iteration weights

在文件MKLMultiClass.h176行定义。


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

SHOGUN Machine Learning Toolbox - Documentation