Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

CSVMOcas Class Reference

Detailed Description

class SVMOcas

Definition at line 30 of file SVMOcas.h.

Inheritance diagram for CSVMOcas:
Inheritance graph

List of all members.

Public Member Functions

 CSVMOcas (void)
 CSVMOcas (E_SVM_TYPE type)
 CSVMOcas (float64_t C, CDotFeatures *traindat, CLabels *trainlab)
virtual ~CSVMOcas ()
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_epsilon (float64_t eps)
float64_t get_epsilon ()
void set_bias_enabled (bool enable_bias)
bool get_bias_enabled ()
void set_bufsize (int32_t sz)
int32_t get_bufsize ()

Protected Member Functions

virtual const char * get_name () const

Static Protected Member Functions

static void compute_W (float64_t *sq_norm_W, float64_t *dp_WoldW, float64_t *alpha, uint32_t nSel, void *ptr)
static float64_t update_W (float64_t t, void *ptr)
static int add_new_cut (float64_t *new_col_H, uint32_t *new_cut, uint32_t cut_length, uint32_t nSel, void *ptr)
static int compute_output (float64_t *output, void *ptr)
static int sort (float64_t *vals, float64_t *data, uint32_t size)
static void print (ocas_return_value_T value)

Protected Attributes

bool use_bias
int32_t bufsize
float64_t C1
float64_t C2
float64_t epsilon
E_SVM_TYPE method
float64_t old_bias
float64_t ** cp_value
uint32_t ** cp_index
uint32_t * cp_nz_dims

Constructor & Destructor Documentation

CSVMOcas ( void   ) 

default constructor

Definition at line 24 of file SVMOcas.cpp.

CSVMOcas ( E_SVM_TYPE  type  ) 


type a E_SVM_TYPE

Definition at line 30 of file SVMOcas.cpp.

CSVMOcas ( float64_t  C,
CDotFeatures traindat,
CLabels trainlab 


C constant C
traindat training features
trainlab labels for training features

Definition at line 37 of file SVMOcas.cpp.

~CSVMOcas (  )  [virtual]

Definition at line 50 of file SVMOcas.cpp.

Member Function Documentation

int add_new_cut ( float64_t new_col_H,
uint32_t *  new_cut,
uint32_t  cut_length,
uint32_t  nSel,
void *  ptr 
) [static, protected]

add new cut

new_col_H new col H
new_cut new cut
cut_length length of cut
nSel nSel
ptr ptr

Definition at line 187 of file SVMOcas.cpp.

int compute_output ( float64_t output,
void *  ptr 
) [static, protected]

compute output

output output
ptr ptr

Definition at line 274 of file SVMOcas.cpp.

void compute_W ( float64_t sq_norm_W,
float64_t dp_WoldW,
float64_t alpha,
uint32_t  nSel,
void *  ptr 
) [static, protected]

compute W

sq_norm_W square normed W
dp_WoldW dp W old W
alpha alpha
nSel nSel
ptr ptr

Definition at line 300 of file SVMOcas.cpp.

bool get_bias_enabled (  ) 

check if bias is enabled

if bias is enabled

Definition at line 111 of file SVMOcas.h.

int32_t get_bufsize (  ) 

get buffer size

buffer size

Definition at line 123 of file SVMOcas.h.

float64_t get_C1 (  ) 

get C1


Definition at line 81 of file SVMOcas.h.

float64_t get_C2 (  ) 

get C2


Definition at line 87 of file SVMOcas.h.

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

classifier type SVMOCAS

Reimplemented from CClassifier.

Definition at line 57 of file SVMOcas.h.

float64_t get_epsilon (  ) 

get epsilon


Definition at line 99 of file SVMOcas.h.

virtual const char* get_name ( void   )  const [protected, virtual]
object name

Reimplemented from CLinearClassifier.

Definition at line 180 of file SVMOcas.h.

static void print ( ocas_return_value_T  value  )  [static, protected]

print nothing

Definition at line 174 of file SVMOcas.h.

void set_bias_enabled ( bool  enable_bias  ) 

set if bias shall be enabled

enable_bias if bias shall be enabled

Definition at line 105 of file SVMOcas.h.

void set_bufsize ( int32_t  sz  ) 

set buffer size

sz buffer size

Definition at line 117 of file SVMOcas.h.

void set_C ( float64_t  c_neg,
float64_t  c_pos 

set C

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

Definition at line 75 of file SVMOcas.h.

void set_epsilon ( float64_t  eps  ) 

set epsilon

eps new epsilon

Definition at line 93 of file SVMOcas.h.

int sort ( float64_t vals,
float64_t data,
uint32_t  size 
) [static, protected]


vals vals
data data
size size

Definition at line 263 of file SVMOcas.cpp.

bool train ( CFeatures 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

Reimplemented from CClassifier.

Definition at line 54 of file SVMOcas.cpp.

float64_t update_W ( float64_t  t,
void *  ptr 
) [static, protected]

update W

t t
ptr ptr
something floaty

Definition at line 160 of file SVMOcas.cpp.

Member Data Documentation

int32_t bufsize [protected]

buffer size

Definition at line 188 of file SVMOcas.h.

float64_t C1 [protected]


Definition at line 190 of file SVMOcas.h.

float64_t C2 [protected]


Definition at line 192 of file SVMOcas.h.

float64_t* cp_bias [protected]

bias dimensions

Definition at line 215 of file SVMOcas.h.

uint32_t** cp_index [protected]

cutting plane index

Definition at line 211 of file SVMOcas.h.

uint32_t* cp_nz_dims [protected]

cutting plane dimensions

Definition at line 213 of file SVMOcas.h.

float64_t** cp_value [protected]

sparse representation of cutting planes

Definition at line 209 of file SVMOcas.h.

float64_t epsilon [protected]


Definition at line 194 of file SVMOcas.h.

float64_t* lab [protected]


Definition at line 205 of file SVMOcas.h.

E_SVM_TYPE method [protected]


Definition at line 196 of file SVMOcas.h.

float64_t old_bias [protected]

old bias

Definition at line 201 of file SVMOcas.h.

float64_t* old_w [protected]

old W

Definition at line 199 of file SVMOcas.h.

float64_t* tmp_a_buf [protected]

nDim big

Definition at line 203 of file SVMOcas.h.

bool use_bias [protected]

if bias is used

Definition at line 186 of file SVMOcas.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