SHOGUN  v3.0.0
 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/common.h>
16 
17 #include <stdio.h>
18 
19 namespace shogun
20 {
21 
22 #ifdef HAVE_LAPACK
23 
26 {
27 
28  public:
29 
32 
33 
43 
44 
47 
48 
54  void init(CLinearMachine* presvm, float64_t B);
55 
61 
62 
68  virtual CBinaryLabels* apply_binary(CFeatures* data=NULL);
69 
70 
75  virtual CLinearMachine* get_presvm();
76 
77 
82  virtual float64_t get_B();
83 
84 
89  virtual float64_t get_train_factor();
90 
91 
95  virtual void set_train_factor(float64_t factor);
96 
102  //virtual std::vector<float64_t> get_linear_term();
103 
104 
105  /*
106  * set linear term of the QP
107  *
108  * @param lin the linear term
109  */
110  //virtual void set_linear_term(std::vector<float64_t> lin);
111 
112 
114  virtual const char* get_name() const { return "DomainAdaptationSVMLinear"; }
115 
116  protected:
117 
122  virtual bool is_presvm_sane();
123 
132  virtual bool train_machine(CFeatures* data=NULL);
133 
134  protected:
135 
138 
139 
142 
143 
146 
147 
148 };
149 #endif //HAVE_LAPACK
150 
151 } /* namespace shogun */
152 
153 #endif //_DomainAdaptation_SVM_LINEAR_H___

SHOGUN Machine Learning Toolbox - Documentation