Public Member Functions | Protected Member Functions

COnlineSVMSGD Class Reference


Detailed Description

class OnlineSVMSGD

Definition at line 33 of file OnlineSVMSGD.h.

Inheritance diagram for COnlineSVMSGD:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 COnlineSVMSGD ()
 COnlineSVMSGD (float64_t C)
 COnlineSVMSGD (float64_t C, CStreamingDotFeatures *traindat)
virtual ~COnlineSVMSGD ()
virtual EClassifierType get_classifier_type ()
virtual bool train (CFeatures *data=NULL)
void set_C (float64_t c_neg, float64_t c_pos)
float64_t get_C1 ()
float64_t get_C2 ()
void set_epochs (int32_t e)
int32_t get_epochs ()
void set_lambda (float64_t l)
float64_t get_lambda ()
void set_bias_enabled (bool enable_bias)
bool get_bias_enabled ()
void set_regularized_bias_enabled (bool enable_bias)
bool get_regularized_bias_enabled ()
void set_loss_function (CLossFunction *loss_func)
CLossFunctionget_loss_function ()
virtual const char * get_name () const

Protected Member Functions

void calibrate (int32_t max_vec_num=1000)

Constructor & Destructor Documentation

COnlineSVMSGD (  ) 

default constructor

Definition at line 30 of file OnlineSVMSGD.cpp.

COnlineSVMSGD ( float64_t  C  ) 

constructor

Parameters:
C constant C

Definition at line 36 of file OnlineSVMSGD.cpp.

constructor

Parameters:
C constant C
traindat training features

Definition at line 45 of file OnlineSVMSGD.cpp.

~COnlineSVMSGD (  )  [virtual]

Definition at line 55 of file OnlineSVMSGD.cpp.


Member Function Documentation

void calibrate ( int32_t  max_vec_num = 1000  )  [protected]

calibrate

Parameters:
max_vec_num Maximum number of vectors to calibrate using (optional) if set to -1, tries to calibrate using all vectors

Definition at line 167 of file OnlineSVMSGD.cpp.

bool get_bias_enabled (  ) 

check if bias is enabled

Returns:
if bias is enabled

Definition at line 124 of file OnlineSVMSGD.h.

float64_t get_C1 (  ) 

get C1

Returns:
C1

Definition at line 82 of file OnlineSVMSGD.h.

float64_t get_C2 (  ) 

get C2

Returns:
C2

Definition at line 88 of file OnlineSVMSGD.h.

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

Returns:
classifier type OnlineSVMSGD

Reimplemented from CMachine.

Definition at line 58 of file OnlineSVMSGD.h.

int32_t get_epochs (  ) 

get epochs

Returns:
the number of training epochs

Definition at line 100 of file OnlineSVMSGD.h.

float64_t get_lambda (  ) 

get lambda

Returns:
the regularization parameter lambda

Definition at line 112 of file OnlineSVMSGD.h.

CLossFunction* get_loss_function (  ) 

Return the loss function

Returns:
loss function as CLossFunction*

Definition at line 148 of file OnlineSVMSGD.h.

virtual const char* get_name ( void   )  const [virtual]
Returns:
object name

Reimplemented from COnlineLinearMachine.

Definition at line 151 of file OnlineSVMSGD.h.

bool get_regularized_bias_enabled (  ) 

check if regularized bias is enabled

Returns:
if regularized bias is enabled

Definition at line 136 of file OnlineSVMSGD.h.

void set_bias_enabled ( bool  enable_bias  ) 

set if bias shall be enabled

Parameters:
enable_bias if bias shall be enabled

Definition at line 118 of file OnlineSVMSGD.h.

void set_C ( float64_t  c_neg,
float64_t  c_pos 
)

set C

Parameters:
c_neg new C constant for negatively labeled examples
c_pos new C constant for positively labeled examples

Definition at line 76 of file OnlineSVMSGD.h.

void set_epochs ( int32_t  e  ) 

set epochs

Parameters:
e new number of training epochs

Definition at line 94 of file OnlineSVMSGD.h.

void set_lambda ( float64_t  l  ) 

set lambda

Parameters:
l value of regularization parameter lambda

Definition at line 106 of file OnlineSVMSGD.h.

void set_loss_function ( CLossFunction loss_func  ) 

Set the loss function to use

Parameters:
loss_func object derived from CLossFunction

Definition at line 60 of file OnlineSVMSGD.cpp.

void set_regularized_bias_enabled ( bool  enable_bias  ) 

set if regularized bias shall be enabled

Parameters:
enable_bias if regularized bias shall be enabled

Definition at line 130 of file OnlineSVMSGD.h.

bool train ( CFeatures data = NULL  )  [virtual]

train classifier

Parameters:
data training data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data)
Returns:
whether training was successful

Reimplemented from CMachine.

Definition at line 68 of file OnlineSVMSGD.cpp.


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