Public Member Functions | Protected Member Functions

CSVMSGD Class Reference


Detailed Description

class SVMSGD

Definition at line 34 of file SVMSGD.h.

Inheritance diagram for CSVMSGD:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CSVMSGD ()
 CSVMSGD (float64_t C)
 CSVMSGD (float64_t C, CDotFeatures *traindat, CLabels *trainlab)
virtual ~CSVMSGD ()
virtual EClassifierType get_classifier_type ()
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_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 ()
virtual bool train_machine (CFeatures *data=NULL)

Constructor & Destructor Documentation

CSVMSGD (  ) 

default constructor

Definition at line 30 of file SVMSGD.cpp.

CSVMSGD ( float64_t  C  ) 

constructor

Parameters:
C constant C

Definition at line 36 of file SVMSGD.cpp.

CSVMSGD ( float64_t  C,
CDotFeatures traindat,
CLabels trainlab 
)

constructor

Parameters:
C constant C
traindat training features
trainlab labels for training features

Definition at line 45 of file SVMSGD.cpp.

~CSVMSGD (  )  [virtual]

Definition at line 56 of file SVMSGD.cpp.


Member Function Documentation

void calibrate (  )  [protected]

calibrate

Definition at line 160 of file SVMSGD.cpp.

bool get_bias_enabled (  ) 

check if bias is enabled

Returns:
if bias is enabled

Definition at line 106 of file SVMSGD.h.

float64_t get_C1 (  ) 

get C1

Returns:
C1

Definition at line 76 of file SVMSGD.h.

float64_t get_C2 (  ) 

get C2

Returns:
C2

Definition at line 82 of file SVMSGD.h.

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

Returns:
classifier type SVMOCAS

Reimplemented from CMachine.

Definition at line 62 of file SVMSGD.h.

int32_t get_epochs (  ) 

get epochs

Returns:
the number of training epochs

Definition at line 94 of file SVMSGD.h.

CLossFunction* get_loss_function (  ) 

Return the loss function

Returns:
loss function as CLossFunction*

Definition at line 130 of file SVMSGD.h.

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

Reimplemented from CLinearMachine.

Definition at line 133 of file SVMSGD.h.

bool get_regularized_bias_enabled (  ) 

check if regularized bias is enabled

Returns:
if regularized bias is enabled

Definition at line 118 of file SVMSGD.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 100 of file SVMSGD.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 70 of file SVMSGD.h.

void set_epochs ( int32_t  e  ) 

set epochs

Parameters:
e new number of training epochs

Definition at line 88 of file SVMSGD.h.

void set_loss_function ( CLossFunction loss_func  ) 

Set the loss function to use

Parameters:
loss_func object derived from CLossFunction

Definition at line 61 of file SVMSGD.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 112 of file SVMSGD.h.

bool train_machine ( CFeatures data = NULL  )  [protected, 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 69 of file SVMSGD.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