SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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 <shogun/lib/config.h>
18 #include <shogun/base/SGObject.h>
19 #include <shogun/kernel/Kernel.h>
25 
26 
27 namespace shogun
28 {
29 
41 {
42 public:
45 
52 
54  virtual ~CMKLMulticlass();
55 
61  { return CT_MKLMULTICLASS; }
62 
71  float64_t* getsubkernelweights(int32_t & numweights);
72 
80  void set_mkl_epsilon(float64_t eps );
81 
89  void set_max_num_mkliters(int32_t maxnum);
90 
94  virtual void set_mkl_norm(float64_t norm);
95 
96 protected:
101  CMKLMulticlass( const CMKLMulticlass & cm);
102 
108 
113  void initlpsolver();
114 
118  void initsvm();
119 
120 
126  virtual bool evaluatefinishcriterion(const int32_t
127  numberofsilpiterations);
128 
129 
139  void addingweightsstep( const std::vector<float64_t> & curweights);
140 
146 
154  const int32_t ind);
155 
164  virtual bool train_machine(CFeatures* data=NULL);
165 
167  virtual const char* get_name() const { return "MKLMulticlass"; }
168 
169 protected:
175 
178 
180  ::std::vector< std::vector< float64_t> > weightshistory;
181 
186 
191 
196 
201  std::vector<float64_t> normweightssquared;
202 
204  std::vector<float64_t> oldnormweightssquared;
205 
210 };
211 
212 }
213 #endif // GMNPMKL_H_
std::vector< float64_t > oldnormweightssquared
EMachineType
Definition: Machine.h:33
MKLMulticlass is a class for L1-norm Multiclass MKL.
Definition: MKLMulticlass.h:40
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
void addingweightsstep(const std::vector< float64_t > &curweights)
virtual void set_mkl_norm(float64_t norm)
CMKLMulticlass operator=(const CMKLMulticlass &cm)
virtual bool evaluatefinishcriterion(const int32_t numberofsilpiterations)
float64_t getsquarenormofprimalcoefficients(const int32_t ind)
class MultiClassSVM
Definition: MulticlassSVM.h:28
double float64_t
Definition: common.h:50
::std::vector< std::vector< float64_t > > weightshistory
float64_t getsumofsignfreealphas()
MKLMulticlassOptimizationBase is a helper class for MKLMulticlass.
float64_t * getsubkernelweights(int32_t &numweights)
MKLMulticlassOptimizationBase * lpw
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
Class GMNPSVM implements a one vs. rest MultiClass SVM.
Definition: GMNPSVM.h:26
The class Features is the base class of all feature objects.
Definition: Features.h:68
std::vector< float64_t > normweightssquared
void set_mkl_epsilon(float64_t eps)
The Kernel base class.
Definition: Kernel.h:159
virtual bool train_machine(CFeatures *data=NULL)
virtual const char * get_name() const
virtual EMachineType get_classifier_type()
Definition: MKLMulticlass.h:60
void set_max_num_mkliters(int32_t maxnum)

SHOGUN Machine Learning Toolbox - Documentation