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 
20 namespace shogun
21 {
22 
23 #ifdef HAVE_LAPACK
24 
27 {
28 
29  public:
30 
33 
34 
44 
45 
48 
49 
55  void init(CLinearMachine* presvm, float64_t B);
56 
62 
63 
69  virtual CBinaryLabels* apply_binary(CFeatures* data=NULL);
70 
71 
76  virtual CLinearMachine* get_presvm();
77 
78 
83  virtual float64_t get_B();
84 
85 
90  virtual float64_t get_train_factor();
91 
92 
96  virtual void set_train_factor(float64_t factor);
97 
103  //virtual std::vector<float64_t> get_linear_term();
104 
105 
106  /*
107  * set linear term of the QP
108  *
109  * @param lin the linear term
110  */
111  //virtual void set_linear_term(std::vector<float64_t> lin);
112 
113 
115  virtual const char* get_name() const { return "DomainAdaptationSVMLinear"; }
116 
117  protected:
118 
123  virtual bool is_presvm_sane();
124 
133  virtual bool train_machine(CFeatures* data=NULL);
134 
135  protected:
136 
139 
140 
143 
144 
147 
148 
149 };
150 #endif //HAVE_LAPACK
151 
152 } /* namespace shogun */
153 
154 #endif //_DomainAdaptation_SVM_LINEAR_H___

SHOGUN Machine Learning Toolbox - Documentation