SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MKLMultiClass.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2009 Alexander Binder
8  * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef MKLMULTICLASS_H_
12 #define MKLMULTICLASS_H_
13 
14 #include <vector>
15 
16 #include <shogun/base/SGObject.h>
17 #include <shogun/kernel/Kernel.h>
22 
23 
24 namespace shogun
25 {
33 {
34 public:
45 
46 
50  virtual ~CMKLMultiClass();
51 
57  { return CT_MKLMULTICLASS; }
58 
59 
68  float64_t* getsubkernelweights(int32_t & numweights);
69 
77  void set_mkl_epsilon(float64_t eps );
78 
86  void set_max_num_mkliters(int32_t maxnum);
87 
91  virtual void set_mkl_norm(float64_t norm);
92 
93 
94 protected:
99  CMKLMultiClass( const CMKLMultiClass & cm);
105 
110  void initlpsolver();
111 
115  void initsvm();
116 
117 
118 
119 
125  virtual bool evaluatefinishcriterion(const int32_t
126  numberofsilpiterations);
127 
128 
138  void addingweightsstep( const std::vector<float64_t> & curweights);
151  const int32_t ind);
152 
153 
162  virtual bool train_machine(CFeatures* data=NULL);
163 
164 
165 protected:
178  ::std::vector< std::vector< float64_t> > weightshistory;
179 
195  std::vector<float64_t> normweightssquared;
196 
197 };
198 }
199 #endif // GMNPMKL_H_
virtual EClassifierType get_classifier_type()
Definition: MKLMultiClass.h:56
EClassifierType
Definition: Machine.h:27
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
MKLMultiClass is a class for L1-norm multiclass MKL.
Definition: MKLMultiClass.h:32
CMKLMultiClass operator=(const CMKLMultiClass &cm)
void addingweightsstep(const std::vector< float64_t > &curweights)
virtual void set_mkl_norm(float64_t norm)
virtual bool evaluatefinishcriterion(const int32_t numberofsilpiterations)
class MultiClassSVM
Definition: MultiClassSVM.h:32
float64_t getsumofsignfreealphas()
float64_t getsquarenormofprimalcoefficients(const int32_t ind)
double float64_t
Definition: common.h:56
::std::vector< std::vector< float64_t > > weightshistory
MKLMultiClassOptimizationBase is a helper class for MKLMultiClass.
float64_t * getsubkernelweights(int32_t &numweights)
MKLMultiClassOptimizationBase * lpw
Class GMNPSVM implements a one vs. rest MultiClass SVM.
Definition: GMNPSVM.h:24
The class Features is the base class of all feature objects.
Definition: Features.h:56
The Kernel base class.
Definition: Kernel.h:172
void set_mkl_epsilon(float64_t eps)
virtual bool train_machine(CFeatures *data=NULL)
void set_max_num_mkliters(int32_t maxnum)

SHOGUN Machine Learning Toolbox - Documentation