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/base/SGObject.h>
20 #include <shogun/kernel/Kernel.h>
26 
27 
28 namespace shogun
29 {
30 
42 {
43 public:
46 
53 
55  virtual ~CMKLMulticlass();
56 
62  { return CT_MKLMULTICLASS; }
63 
72  float64_t* getsubkernelweights(int32_t & numweights);
73 
81  void set_mkl_epsilon(float64_t eps );
82 
90  void set_max_num_mkliters(int32_t maxnum);
91 
95  virtual void set_mkl_norm(float64_t norm);
96 
97 protected:
102  CMKLMulticlass( const CMKLMulticlass & cm);
103 
109 
114  void initlpsolver();
115 
119  void initsvm();
120 
121 
127  virtual bool evaluatefinishcriterion(const int32_t
128  numberofsilpiterations);
129 
130 
140  void addingweightsstep( const std::vector<float64_t> & curweights);
141 
147 
155  const int32_t ind);
156 
165  virtual bool train_machine(CFeatures* data=NULL);
166 
168  virtual const char* get_name() const { return "MKLMulticlass"; }
169 
170 protected:
176 
179 
181  ::std::vector< std::vector< float64_t> > weightshistory;
182 
187 
192 
197 
202  std::vector<float64_t> normweightssquared;
203 
205  std::vector<float64_t> oldnormweightssquared;
206 
211 };
212 
213 }
214 #endif // GMNPMKL_H_

SHOGUN Machine Learning Toolbox - Documentation