Public Member Functions | Protected Member Functions | Protected Attributes

CDomainAdaptationSVMLinear Class Reference

Detailed Description

class DomainAdaptationSVMLinear

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, CLinearMachine *presvm, float64_t B)
virtual ~CDomainAdaptationSVMLinear ()
void init (CLinearMachine *presvm, float64_t B)
virtual EClassifierType get_classifier_type ()
virtual CLabelsapply (CDotFeatures *data)
virtual CLinearMachineget_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

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 * apply ( CDotFeatures data  )  [virtual]

classify objects

data (test)data to be classified
classified labels

Definition at line 200 of file DomainAdaptationSVMLinear.cpp.

float64_t get_B (  )  [virtual]

getter for regularization parameter B

regularization parameter B

Definition at line 182 of file DomainAdaptationSVMLinear.cpp.

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

classifier type DASVMLINEAR

Reimplemented from CLibLinear.

Definition at line 60 of file DomainAdaptationSVMLinear.h.

virtual const char* get_name (  )  const [virtual]

get linear term

lin the linear term
object name

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

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 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)
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 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.

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