SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DomainAdaptationSVMLinear.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) 2007-2011 Christian Widmer
8  * Copyright (C) 2007-2011 Max-Planck-Society
9  */
10 
11 #ifndef _DomainAdaptation_SVM_LINEAR_H___
12 #define _DomainAdaptation_SVM_LINEAR_H___
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
18 
19 #include <stdio.h>
20 
21 namespace shogun
22 {
23 
24 #ifdef HAVE_LAPACK
25 
28 {
29 
30  public:
31 
34 
35 
45 
46 
49 
50 
56  void init(CLinearMachine* presvm, float64_t B);
57 
63 
64 
70  virtual CBinaryLabels* apply_binary(CFeatures* data=NULL);
71 
72 
77  virtual CLinearMachine* get_presvm();
78 
79 
84  virtual float64_t get_B();
85 
86 
91  virtual float64_t get_train_factor();
92 
93 
97  virtual void set_train_factor(float64_t factor);
98 
104  //virtual std::vector<float64_t> get_linear_term();
105 
106 
107  /*
108  * set linear term of the QP
109  *
110  * @param lin the linear term
111  */
112  //virtual void set_linear_term(std::vector<float64_t> lin);
113 
114 
116  virtual const char* get_name() const { return "DomainAdaptationSVMLinear"; }
117 
118  protected:
119 
124  virtual bool is_presvm_sane();
125 
134  virtual bool train_machine(CFeatures* data=NULL);
135 
136  protected:
137 
140 
141 
144 
145 
148 
149 
150 };
151 #endif //HAVE_LAPACK
152 
153 } /* namespace shogun */
154 
155 #endif //_DomainAdaptation_SVM_LINEAR_H___

SHOGUN Machine Learning Toolbox - Documentation