CLibLinear Class Reference


Detailed Description

class to implement LibLinear

Definition at line 29 of file LibLinear.h.

Inheritance diagram for CLibLinear:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CLibLinear (LIBLINEAR_LOSS loss)
 CLibLinear (float64_t C, CDotFeatures *traindat, CLabels *trainlab)
virtual ~CLibLinear ()
virtual bool train (CFeatures *data=NULL)
virtual EClassifierType get_classifier_type ()
void set_C (float64_t c1, float64_t c2)
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 ()
virtual const char * get_name () const

Protected Attributes

float64_t C1
float64_t C2
bool use_bias
float64_t epsilon
LIBLINEAR_LOSS loss

Constructor & Destructor Documentation

CLibLinear ( LIBLINEAR_LOSS  loss  ) 

constructor

Parameters:
loss loss

Definition at line 21 of file LibLinear.cpp.

CLibLinear ( float64_t  C,
CDotFeatures traindat,
CLabels trainlab 
)

constructor

Parameters:
C constant C
traindat training features
trainlab training labels

Definition at line 30 of file LibLinear.cpp.

~CLibLinear (  )  [virtual]

Definition at line 40 of file LibLinear.cpp.


Member Function Documentation

bool get_bias_enabled (  ) 

check if bias is enabled

Returns:
if bias is enabled

Definition at line 107 of file LibLinear.h.

float64_t get_C1 (  ) 

get C1

Returns:
C1

Definition at line 77 of file LibLinear.h.

float64_t get_C2 (  ) 

get C2

Returns:
C2

Definition at line 83 of file LibLinear.h.

virtual EClassifierType get_classifier_type (  )  [virtual]

get classifier type

Returns:
the classifier type

Reimplemented from CClassifier.

Definition at line 64 of file LibLinear.h.

float64_t get_epsilon (  ) 

get epsilon

Returns:
epsilon

Definition at line 95 of file LibLinear.h.

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

Implements CSGObject.

Definition at line 110 of file LibLinear.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 101 of file LibLinear.h.

void set_C ( float64_t  c1,
float64_t  c2 
)

set C

Parameters:
c1 C1
c2 C2

Definition at line 71 of file LibLinear.h.

void set_epsilon ( float64_t  eps  ) 

set epsilon

Parameters:
eps new epsilon

Definition at line 89 of file LibLinear.h.

bool train ( CFeatures data = NULL  )  [virtual]

train linear SVM 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 CClassifier.

Definition at line 44 of file LibLinear.cpp.


Member Data Documentation

float64_t C1 [protected]

C1

Definition at line 114 of file LibLinear.h.

float64_t C2 [protected]

C2

Definition at line 116 of file LibLinear.h.

float64_t epsilon [protected]

epsilon

Definition at line 120 of file LibLinear.h.

LIBLINEAR_LOSS loss [protected]

loss

Definition at line 123 of file LibLinear.h.

bool use_bias [protected]

if bias shall be used

Definition at line 118 of file LibLinear.h.


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

SHOGUN Machine Learning Toolbox - Documentation