SHOGUN v0.9.0
|
MKLMultiClassGradient is a helper class for MKLMultiClass.
it solves the corresponding linear problem arising in SIP formulation for MKL using a gradient based approach
在文件MKLMultiClassGradient.h第28行定义。
公有成员 | |
MKLMultiClassGradient () | |
virtual | ~MKLMultiClassGradient () |
MKLMultiClassGradient (MKLMultiClassGradient &gl) | |
MKLMultiClassGradient | operator= (MKLMultiClassGradient &gl) |
virtual void | setup (const int32_t numkernels2) |
virtual void | addconstraint (const ::std::vector< float64_t > &normw2, const float64_t sumofpositivealphas) |
virtual void | computeweights (std::vector< float64_t > &weights2) |
virtual const char * | get_name () const |
virtual void | set_mkl_norm (float64_t norm) |
保护成员 | |
void | genbetas (::std::vector< float64_t > &weights, const ::std::vector< float64_t > &gammas) |
void | gengammagradient (::std::vector< float64_t > &gammagradient, const ::std::vector< float64_t > &gammas, const int32_t dim) |
float64_t | objectives (const ::std::vector< float64_t > &weights, const int32_t index) |
void | linesearch (std::vector< float64_t > &finalbeta, const std::vector< float64_t > &oldweights) |
保护属性 | |
int32_t | numkernels |
::std::vector< ::std::vector < float64_t > > | normsofsubkernels |
::std::vector< float64_t > | sumsofalphas |
float64_t | pnorm |
Class default Constructor
在文件MKLMultiClassGradient.cpp第15行定义。
~MKLMultiClassGradient | ( | ) | [virtual] |
Class default Destructor
在文件MKLMultiClassGradient.cpp第21行定义。
Class Copy Constructor
在文件MKLMultiClassGradient.cpp第33行定义。
void addconstraint | ( | const ::std::vector< float64_t > & | normw2, |
const float64_t | sumofpositivealphas | ||
) | [virtual] |
adds a constraint to the LP arising in L1 MKL based on two parameters
normw2 | is the vector of ![]() |
sumofpositivealphas | is a term depending on alphas, labels and biases, see in the function float64_t getsumofsignfreealphas() from MKLMultiClass.h, it depends on the formulation of the underlying GMNPSVM. |
重载MKLMultiClassOptimizationBase。
在文件MKLMultiClassGradient.cpp第60行定义。
void computeweights | ( | std::vector< float64_t > & | weights2 | ) | [virtual] |
computes MKL weights
weights2 | stores the new weights |
重载MKLMultiClassOptimizationBase。
在文件MKLMultiClassGradient.cpp第355行定义。
void genbetas | ( | ::std::vector< float64_t > & | weights, |
const ::std::vector< float64_t > & | gammas | ||
) | [protected] |
helper routine for MKL optimization, computes form manifold coordinates the point on the manifold
gammas | - manifold coordinates |
weights | - the point on the manifold |
在文件MKLMultiClassGradient.cpp第67行定义。
void gengammagradient | ( | ::std::vector< float64_t > & | gammagradient, |
const ::std::vector< float64_t > & | gammas, | ||
const int32_t | dim | ||
) | [protected] |
helper routine for MKL optimization, computes greadient of manifold parametrization for one coordinate
gammagradient | - gradient |
gammas | - manifold coordinates |
dim | - the coordinate for which thegradient is to be computed |
在文件MKLMultiClassGradient.cpp第98行定义。
virtual const char* get_name | ( | void | ) | const [virtual] |
sets L^p norm
weights2 | stores the new weights |
重载MKLMultiClassOptimizationBase。
在文件MKLMultiClassGradient.h第84行定义。
void linesearch | ( | std::vector< float64_t > & | finalbeta, |
const std::vector< float64_t > & | oldweights | ||
) | [protected] |
helper routine for MKL optimization, performs linesearch
oldweights | - MKL weights to start from |
weights | - new MKL weights |
在文件MKLMultiClassGradient.cpp第154行定义。
float64_t objectives | ( | const ::std::vector< float64_t > & | weights, |
const int32_t | index | ||
) | [protected] |
helper routine for MKL optimization, computes optimization objective for one contraint
weights | - MKL weights |
index | - index of constraint |
在文件MKLMultiClassGradient.cpp第138行定义。
MKLMultiClassGradient operator= | ( | MKLMultiClassGradient & | gl | ) |
Class Assignment operator
在文件MKLMultiClassGradient.cpp第26行定义。
void set_mkl_norm | ( | float64_t | norm | ) | [virtual] |
sets p-norm parameter for MKL
norm | the MKL norm |
重载MKLMultiClassOptimizationBase。
在文件MKLMultiClassGradient.cpp第52行定义。
void setup | ( | const int32_t | numkernels2 | ) | [virtual] |
initializes solver
numkernels2 | is the number of kernels |
重载MKLMultiClassOptimizationBase。
在文件MKLMultiClassGradient.cpp第40行定义。
::std::vector< ::std::vector<float64_t> > normsofsubkernels [protected] |
stores normsofsubkernels which is a constraint, normsofsubkernels[i] belongs to the i-th constraint
在文件MKLMultiClassGradient.h第131行定义。
int32_t numkernels [protected] |
stores the number of kernels which acts as a parameter for the LP
在文件MKLMultiClassGradient.h第128行定义。
stores the L^p norm which acts as a parameter for the LP
在文件MKLMultiClassGradient.h第135行定义。
::std::vector< float64_t > sumsofalphas [protected] |
stores the bias type term of constraints, sumsofalphas[i] belongs to the i-th constraint
在文件MKLMultiClassGradient.h第133行定义。