SHOGUN  v3.0.0
 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 
38 {
39 public:
48 
50  virtual ~CMKLMulticlass();
51 
57  { return CT_MKLMULTICLASS; }
58 
67  float64_t* getsubkernelweights(int32_t & numweights);
68 
76  void set_mkl_epsilon(float64_t eps );
77 
85  void set_max_num_mkliters(int32_t maxnum);
86 
90  virtual void set_mkl_norm(float64_t norm);
91 
92 protected:
97  CMKLMulticlass( const CMKLMulticlass & cm);
98 
104 
109  void initlpsolver();
110 
114  void initsvm();
115 
116 
122  virtual bool evaluatefinishcriterion(const int32_t
123  numberofsilpiterations);
124 
125 
135  void addingweightsstep( const std::vector<float64_t> & curweights);
136 
142 
150  const int32_t ind);
151 
160  virtual bool train_machine(CFeatures* data=NULL);
161 
163  virtual const char* get_name() const { return "MKLMulticlass"; }
164 
165 protected:
171 
174 
176  ::std::vector< std::vector< float64_t> > weightshistory;
177 
182 
187 
192 
196  std::vector<float64_t> normweightssquared;
197 
199  std::vector<float64_t> oldnormweightssquared;
200 
205 };
206 
207 }
208 #endif // GMNPMKL_H_

SHOGUN Machine Learning Toolbox - Documentation