SHOGUN  v3.0.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
DomainAdaptationSVMLinear.h
浏览该文件的文档.
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___
EMachineType
Definition: Machine.h:33
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:35
Features that support dot products among other operations.
Definition: DotFeatures.h:41
class DomainAdaptationSVMLinear
virtual const char * get_name() const
virtual bool train_machine(CFeatures *data=NULL)
double float64_t
Definition: common.h:48
class to implement LibLinear
Definition: LibLinear.h:45
Class LinearMachine is a generic interface for all kinds of linear machines like classifiers.
Definition: LinearMachine.h:61
virtual void set_train_factor(float64_t factor)
void init(CLinearMachine *presvm, float64_t B)
The class Features is the base class of all feature objects.
Definition: Features.h:62
Binary Labels for binary classification.
Definition: BinaryLabels.h:36
virtual CBinaryLabels * apply_binary(CFeatures *data=NULL)

SHOGUN Machine Learning Toolbox - Documentation