class DomainAdaptationSVMLinear
Definition at line 25 of file DomainAdaptationSVMLinear.h.
Public Member Functions | |
CDomainAdaptationSVMLinear () | |
CDomainAdaptationSVMLinear (float64_t C, CDotFeatures *f, CLabels *lab, CLinearMachine *presvm, float64_t B) | |
virtual | ~CDomainAdaptationSVMLinear () |
void | init (CLinearMachine *presvm, float64_t B) |
virtual EClassifierType | get_classifier_type () |
virtual CLabels * | apply (CDotFeatures *data) |
virtual CLinearMachine * | get_presvm () |
virtual float64_t | get_B () |
virtual float64_t | get_train_factor () |
virtual void | set_train_factor (float64_t factor) |
virtual const char * | get_name () const |
Protected Member Functions | |
virtual bool | is_presvm_sane () |
virtual bool | train_machine (CDotFeatures *data=NULL) |
Protected Attributes | |
CLinearMachine * | presvm |
float64_t | B |
float64_t | train_factor |
default constructor
Definition at line 24 of file DomainAdaptationSVMLinear.cpp.
CDomainAdaptationSVMLinear | ( | float64_t | C, | |
CDotFeatures * | f, | |||
CLabels * | lab, | |||
CLinearMachine * | presvm, | |||
float64_t | B | |||
) |
constructor
C | cost constant C | |
f | features | |
lab | labels | |
presvm | trained SVM to regularize against | |
B | trade-off constant B |
Definition at line 30 of file DomainAdaptationSVMLinear.cpp.
~CDomainAdaptationSVMLinear | ( | ) | [virtual] |
destructor
Definition at line 37 of file DomainAdaptationSVMLinear.cpp.
CLabels * apply | ( | CDotFeatures * | data | ) | [virtual] |
classify objects
data | (test)data to be classified |
Definition at line 200 of file DomainAdaptationSVMLinear.cpp.
float64_t get_B | ( | ) | [virtual] |
getter for regularization parameter B
Definition at line 182 of file DomainAdaptationSVMLinear.cpp.
virtual EClassifierType get_classifier_type | ( | ) | [virtual] |
get classifier type
Reimplemented from CLibLinear.
Definition at line 60 of file DomainAdaptationSVMLinear.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
get linear term
Reimplemented from CLibLinear.
Definition at line 114 of file DomainAdaptationSVMLinear.h.
CLinearMachine * get_presvm | ( | ) | [virtual] |
returns SVM that is used as prior information
Definition at line 176 of file DomainAdaptationSVMLinear.cpp.
float64_t get_train_factor | ( | ) | [virtual] |
getter for train_factor
Definition at line 188 of file DomainAdaptationSVMLinear.cpp.
void init | ( | CLinearMachine * | presvm, | |
float64_t | B | |||
) |
init SVM
presvm | trained SVM to regularize against | |
B | trade-off constant B |
Definition at line 45 of file DomainAdaptationSVMLinear.cpp.
bool is_presvm_sane | ( | ) | [protected, virtual] |
check sanity of presvm
Definition at line 74 of file DomainAdaptationSVMLinear.cpp.
void set_train_factor | ( | float64_t | factor | ) | [virtual] |
setter for train_factor
Definition at line 194 of file DomainAdaptationSVMLinear.cpp.
bool train_machine | ( | CDotFeatures * | data = NULL |
) | [protected, virtual] |
train SVM classifier
data | training data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data) |
Definition at line 97 of file DomainAdaptationSVMLinear.cpp.
regularization parameter B
Definition at line 141 of file DomainAdaptationSVMLinear.h.
CLinearMachine* presvm [protected] |
SVM to regularize against
Definition at line 137 of file DomainAdaptationSVMLinear.h.
float64_t train_factor [protected] |
flag to switch off regularization in training
Definition at line 145 of file DomainAdaptationSVMLinear.h.