CSVMSGD Class Reference

Inheritance diagram for CSVMSGD:

Inheritance graph
[legend]

List of all members.


Detailed Description

class SVMSGD

Definition at line 31 of file SVMSGD.h.


Public Member Functions

 CSVMSGD (DREAL C)
 CSVMSGD (DREAL C, CSparseFeatures< DREAL > *traindat, CLabels *trainlab)
 ~CSVMSGD ()
virtual EClassifierType get_classifier_type ()
virtual bool train ()
void set_C (DREAL c1, DREAL c2)
DREAL get_C1 ()
DREAL get_C2 ()
void set_epochs (INT e)
INT 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 ()
virtual CLabelsclassify (CLabels *output=NULL)
virtual DREAL classify_example (INT vec_idx)
 get output for example "vec_idx"
void get_w (DREAL **dst_w, INT *dst_dims)
void set_w (DREAL *src_w, INT src_w_dim)
void set_bias (DREAL b)
DREAL get_bias ()
void set_features (CSparseFeatures< DREAL > *feat)
CSparseFeatures< DREAL > * get_features ()
virtual bool load (FILE *srcfile)
virtual bool save (FILE *dstfile)
virtual void set_labels (CLabels *lab)
virtual CLabelsget_labels ()
virtual DREAL get_label (INT i)
void set_max_train_time (DREAL t)
DREAL get_max_train_time ()

Static Public Attributes

static CParallel parallel
static CIO io
static CVersion version

Protected Member Functions

void calibrate ()

Protected Attributes

INT w_dim
DREALw
DREAL bias
CSparseFeatures< DREAL > * features
DREAL max_train_time
CLabelslabels

Constructor & Destructor Documentation

CSVMSGD::CSVMSGD ( DREAL  C  ) 

constructor

Parameters:
C constant C

Definition at line 102 of file SVMSGD.cpp.

CSVMSGD::CSVMSGD ( DREAL  C,
CSparseFeatures< DREAL > *  traindat,
CLabels trainlab 
)

constructor

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

Definition at line 109 of file SVMSGD.cpp.

CSVMSGD::~CSVMSGD (  ) 

Definition at line 119 of file SVMSGD.cpp.


Member Function Documentation

virtual EClassifierType CSVMSGD::get_classifier_type (  )  [virtual]

get classifier type

Returns:
classifier type SVMOCAS

Reimplemented from CClassifier.

Definition at line 54 of file SVMSGD.h.

bool CSVMSGD::train (  )  [virtual]

train SVM

Returns:
true if training was successful

Reimplemented from CClassifier.

Definition at line 125 of file SVMSGD.cpp.

void CSVMSGD::set_C ( DREAL  c1,
DREAL  c2 
)

set C

Parameters:
c1 new C1
c2 new C2

Definition at line 67 of file SVMSGD.h.

DREAL CSVMSGD::get_C1 (  ) 

get C1

Returns:
C1

Definition at line 73 of file SVMSGD.h.

DREAL CSVMSGD::get_C2 (  ) 

get C2

Returns:
C2

Definition at line 79 of file SVMSGD.h.

void CSVMSGD::set_epochs ( INT  e  ) 

set epochs

Parameters:
e new number of training epochs

Definition at line 85 of file SVMSGD.h.

INT CSVMSGD::get_epochs (  ) 

get epochs

Returns:
the number of training epochs

Definition at line 91 of file SVMSGD.h.

void CSVMSGD::set_bias_enabled ( bool  enable_bias  ) 

set if bias shall be enabled

Parameters:
enable_bias if bias shall be enabled

Definition at line 97 of file SVMSGD.h.

bool CSVMSGD::get_bias_enabled (  ) 

check if bias is enabled

Returns:
if bias is enabled

Definition at line 103 of file SVMSGD.h.

void CSVMSGD::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 109 of file SVMSGD.h.

bool CSVMSGD::get_regularized_bias_enabled (  ) 

check if regularized bias is enabled

Returns:
if regularized bias is enabled

Definition at line 115 of file SVMSGD.h.

void CSVMSGD::calibrate (  )  [protected]

calibrate

Definition at line 203 of file SVMSGD.cpp.

CLabels * CSparseLinearClassifier::classify ( CLabels output = NULL  )  [virtual, inherited]

classify all examples

Parameters:
output resulting labels
Returns:
resulting labels

Reimplemented from CClassifier.

Definition at line 24 of file SparseLinearClassifier.cpp.

virtual DREAL CSparseLinearClassifier::classify_example ( INT  vec_idx  )  [virtual, inherited]

get output for example "vec_idx"

Reimplemented from CClassifier.

Definition at line 34 of file SparseLinearClassifier.h.

void CSparseLinearClassifier::get_w ( DREAL **  dst_w,
INT dst_dims 
) [inherited]

get w

Parameters:
dst_w store w in this argument
dst_dims dimension of w

Definition at line 44 of file SparseLinearClassifier.h.

void CSparseLinearClassifier::set_w ( DREAL src_w,
INT  src_w_dim 
) [inherited]

set w

Parameters:
src_w new w
src_w_dim dimension of new w

Definition at line 59 of file SparseLinearClassifier.h.

void CSparseLinearClassifier::set_bias ( DREAL  b  )  [inherited]

set bias

Parameters:
b new bias

Definition at line 69 of file SparseLinearClassifier.h.

DREAL CSparseLinearClassifier::get_bias (  )  [inherited]

get bias

Returns:
bias

Definition at line 78 of file SparseLinearClassifier.h.

void CSparseLinearClassifier::set_features ( CSparseFeatures< DREAL > *  feat  )  [inherited]

set features

Parameters:
feat features to set

Definition at line 87 of file SparseLinearClassifier.h.

CSparseFeatures<DREAL>* CSparseLinearClassifier::get_features (  )  [inherited]

get features

Returns:
features

Definition at line 98 of file SparseLinearClassifier.h.

virtual bool CClassifier::load ( FILE *  srcfile  )  [virtual, inherited]

load Classifier from file

abstract base method

Parameters:
srcfile file to load from
Returns:
failure

Reimplemented in CKernelPerceptron, CKNN, CLinearClassifier, CSVM, CHierarchical, and CKMeans.

Definition at line 56 of file Classifier.h.

virtual bool CClassifier::save ( FILE *  dstfile  )  [virtual, inherited]

save Classifier to file

abstract base method

Parameters:
dstfile file to save to
Returns:
failure

Reimplemented in CKernelPerceptron, CKNN, CLinearClassifier, CSVM, CHierarchical, and CKMeans.

Definition at line 65 of file Classifier.h.

virtual void CClassifier::set_labels ( CLabels lab  )  [virtual, inherited]

set labels

Parameters:
lab labels

Definition at line 71 of file Classifier.h.

virtual CLabels* CClassifier::get_labels (  )  [virtual, inherited]

get labels

Returns:
labels

Definition at line 82 of file Classifier.h.

virtual DREAL CClassifier::get_label ( INT  i  )  [virtual, inherited]

get one specific label

Parameters:
i index of label to get
Returns:
value of label at index i

Definition at line 89 of file Classifier.h.

void CClassifier::set_max_train_time ( DREAL  t  )  [inherited]

set maximum training time

Parameters:
t maximimum training time

Definition at line 95 of file Classifier.h.

DREAL CClassifier::get_max_train_time (  )  [inherited]

get maximum training time

Returns:
maximum training time

Definition at line 101 of file Classifier.h.


Member Data Documentation

INT CSparseLinearClassifier::w_dim [protected, inherited]

dimension of w

Definition at line 102 of file SparseLinearClassifier.h.

DREAL* CSparseLinearClassifier::w [protected, inherited]

w

Definition at line 104 of file SparseLinearClassifier.h.

DREAL CSparseLinearClassifier::bias [protected, inherited]

bias

Definition at line 106 of file SparseLinearClassifier.h.

features

Definition at line 108 of file SparseLinearClassifier.h.

DREAL CClassifier::max_train_time [protected, inherited]

maximum training time

Definition at line 111 of file Classifier.h.

CLabels* CClassifier::labels [protected, inherited]

labels

Definition at line 114 of file Classifier.h.

CParallel CSGObject::parallel [static, inherited]

Definition at line 105 of file SGObject.h.

CIO CSGObject::io [static, inherited]

Definition at line 106 of file SGObject.h.

CVersion CSGObject::version [static, inherited]

Definition at line 107 of file SGObject.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation