SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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___
EMachineType
Definition: Machine.h:33
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
Features that support dot products among other operations.
Definition: DotFeatures.h:44
class DomainAdaptationSVMLinear
virtual const char * get_name() const
virtual bool train_machine(CFeatures *data=NULL)
double float64_t
Definition: common.h:50
This class provides an interface to the LibLinear library for large- scale linear learning focusing o...
Definition: LibLinear.h:61
Class LinearMachine is a generic interface for all kinds of linear machines like classifiers.
Definition: LinearMachine.h:63
virtual void set_train_factor(float64_t factor)
void init(CLinearMachine *presvm, float64_t B)
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
Binary Labels for binary classification.
Definition: BinaryLabels.h:37
virtual CBinaryLabels * apply_binary(CFeatures *data=NULL)

SHOGUN Machine Learning Toolbox - Documentation