00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2009 Alexander Binder 00008 * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef MKLMULTICLASSOPTIMIZATIONBASE_H_ 00012 #define MKLMULTICLASSOPTIMIZATIONBASE_H_ 00013 00014 #include <vector> 00015 #include "base/SGObject.h" 00016 00017 00018 namespace shogun 00019 { 00025 class MKLMultiClassOptimizationBase: public CSGObject 00026 { 00027 public: 00031 MKLMultiClassOptimizationBase(); 00035 virtual ~MKLMultiClassOptimizationBase(); 00036 00043 virtual void setup(const int32_t numkernels2); 00044 00053 virtual void addconstraint(const ::std::vector<float64_t> & normw2, 00054 const float64_t sumofpositivealphas); 00055 00061 virtual void computeweights(std::vector<float64_t> & weights2); 00062 00064 inline virtual const char* get_name() const 00065 { 00066 return "MKLMultiClassOptimizationBase"; 00067 } 00068 00072 virtual void set_mkl_norm(float64_t norm); 00073 00074 protected: 00075 00076 00077 protected: 00078 00079 }; 00080 } 00081 00082 #endif