DomainAdaptationMulticlassLibLinear.h

Go to the documentation of this file.
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) 2012 Sergey Lisitsyn
00008  * Copyright (C) 2012 Sergey Lisitsyn
00009  */
00010 
00011 #ifndef _DOMAINADAPTATIONMULTICLASSLIBLINEAR_H___
00012 #define _DOMAINADAPTATIONMULTICLASSLIBLINEAR_H___
00013 #include <shogun/lib/config.h>
00014 #ifdef HAVE_LAPACK
00015 #include <shogun/multiclass/MulticlassLibLinear.h>
00016 
00017 namespace shogun
00018 {
00019 
00023 class CDomainAdaptationMulticlassLibLinear : public CMulticlassLibLinear
00024 {
00025     public:
00027         CDomainAdaptationMulticlassLibLinear();
00028 
00035         CDomainAdaptationMulticlassLibLinear(float64_t target_C, 
00036                 CDotFeatures* target_features, CLabels* target_labels, 
00037                 CLinearMulticlassMachine* source_machine);
00038 
00040         virtual ~CDomainAdaptationMulticlassLibLinear();
00041 
00043         virtual CBinaryLabels* get_submachine_outputs(int32_t);
00044 
00046         virtual const char* get_name() const
00047         {
00048             return "DomainAdaptationMulticlassLibLinear";
00049         }
00050 
00054         float64_t get_source_bias() const;
00058         void set_source_bias(float64_t source_bias);
00059 
00063         float64_t get_train_factor() const;
00067         void set_train_factor(float64_t train_factor);
00068 
00072         CLinearMulticlassMachine* get_source_machine() const;
00076         void set_source_machine(CLinearMulticlassMachine* source_machine);
00077 
00078 protected:
00079 
00081         virtual SGMatrix<float64_t> obtain_regularizer_matrix() const;
00082 
00083 private:
00084 
00086         void init_defaults();
00087 
00089         void register_parameters();
00090 
00091 protected:
00092 
00094         float64_t m_train_factor;
00095 
00097         float64_t m_source_bias;
00098 
00100         CLinearMulticlassMachine* m_source_machine;
00101 };
00102 }
00103 #endif /* HAVE_LAPACK */
00104 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation