SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  * Update to patch 0.10.0 - thanks to Eric aka Yoo (thereisnoknife@gmail.com)
11  *
12  */
13 
14 #ifndef MKLMulticlass_H_
15 #define MKLMulticlass_H_
16 
17 #include <vector>
18 
19 #include <shogun/lib/config.h>
20 #include <shogun/base/SGObject.h>
21 #include <shogun/kernel/Kernel.h>
27 
28 
29 namespace shogun
30 {
31 
43 {
44 public:
47 
54 
56  virtual ~CMKLMulticlass();
57 
63  { return CT_MKLMULTICLASS; }
64 
73  float64_t* getsubkernelweights(int32_t & numweights);
74 
82  void set_mkl_epsilon(float64_t eps );
83 
91  void set_max_num_mkliters(int32_t maxnum);
92 
96  virtual void set_mkl_norm(float64_t norm);
97 
98 protected:
103  CMKLMulticlass( const CMKLMulticlass & cm);
104 
110 
115  void initlpsolver();
116 
120  void initsvm();
121 
122 
128  virtual bool evaluatefinishcriterion(const int32_t
129  numberofsilpiterations);
130 
131 
141  void addingweightsstep( const std::vector<float64_t> & curweights);
142 
148 
156  const int32_t ind);
157 
166  virtual bool train_machine(CFeatures* data=NULL);
167 
169  virtual const char* get_name() const { return "MKLMulticlass"; }
170 
171 protected:
177 
180 
182  ::std::vector< std::vector< float64_t> > weightshistory;
183 
188 
193 
198 
203  std::vector<float64_t> normweightssquared;
204 
206  std::vector<float64_t> oldnormweightssquared;
207 
212 };
213 
214 }
215 #endif // GMNPMKL_H_

SHOGUN Machine Learning Toolbox - Documentation