Public Member Functions | Protected Member Functions | Protected Attributes

CDomainAdaptationSVMLinear Class Reference

Detailed Description

class DomainAdaptiveSVMLinear

Definition at line 25 of file DomainAdaptationSVMLinear.h.

Inheritance diagram for CDomainAdaptationSVMLinear:
Inheritance graph

List of all members.

Public Member Functions

 CDomainAdaptationSVMLinear ()
 CDomainAdaptationSVMLinear (float64_t C, CDotFeatures *f, CLabels *lab, CLinearClassifier *presvm, float64_t B)
virtual ~CDomainAdaptationSVMLinear ()
void init (CLinearClassifier *presvm, float64_t B)
virtual bool train (CDotFeatures *data=NULL)
virtual EClassifierType get_classifier_type ()
virtual CLabelsclassify (CDotFeatures *data)
virtual CLinearClassifierget_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 ()

Protected Attributes

float64_t B
float64_t train_factor

Constructor & Destructor Documentation

default constructor

Definition at line 24 of file DomainAdaptationSVMLinear.cpp.


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]


Definition at line 37 of file DomainAdaptationSVMLinear.cpp.

Member Function Documentation

CLabels * classify ( CDotFeatures data  )  [virtual]

classify objects

data (test)data to be classified
classified labels

Definition at line 196 of file DomainAdaptationSVMLinear.cpp.

float64_t get_B (  )  [virtual]

getter for regularization parameter B

regularization parameter B

Definition at line 178 of file DomainAdaptationSVMLinear.cpp.

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

classifier type DASVMLINEAR

Reimplemented from CLibLinear.

Definition at line 73 of file DomainAdaptationSVMLinear.h.

virtual const char* get_name ( void   )  const [virtual]

get linear term

lin the linear term set linear term of the QP
lin the linear term
object name

Reimplemented from CLibLinear.

Definition at line 127 of file DomainAdaptationSVMLinear.h.

CLinearClassifier * get_presvm (  )  [virtual]

returns SVM that is used as prior information


Definition at line 172 of file DomainAdaptationSVMLinear.cpp.

float64_t get_train_factor (  )  [virtual]

getter for train_factor


Definition at line 184 of file DomainAdaptationSVMLinear.cpp.

void init ( CLinearClassifier 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

true if sane, throws SG_ERROR otherwise

Definition at line 74 of file DomainAdaptationSVMLinear.cpp.

void set_train_factor ( float64_t  factor  )  [virtual]

setter for train_factor

Definition at line 190 of file DomainAdaptationSVMLinear.cpp.

bool train ( CDotFeatures data = NULL  )  [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)
whether training was successful

Definition at line 97 of file DomainAdaptationSVMLinear.cpp.

Member Data Documentation

float64_t B [protected]

regularization parameter B

Definition at line 143 of file DomainAdaptationSVMLinear.h.

CLinearClassifier* presvm [protected]

SVM to regularize against

Definition at line 139 of file DomainAdaptationSVMLinear.h.

float64_t train_factor [protected]

flag to switch off regularization in training

Definition at line 147 of file DomainAdaptationSVMLinear.h.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation