class to implement LibLinear
Definition at line 45 of file LibLinear.h.
Public Member Functions | |
CLibLinear (LIBLINEAR_SOLVER_TYPE liblinear_solver_type) | |
CLibLinear (float64_t C, CDotFeatures *traindat, CLabels *trainlab) | |
virtual | ~CLibLinear () |
LIBLINEAR_SOLVER_TYPE | get_liblinear_solver_type () |
void | set_liblinear_solver_type (LIBLINEAR_SOLVER_TYPE st) |
virtual bool | train (CFeatures *data=NULL) |
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_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 |
int32_t | get_max_iterations () |
void | set_max_iterations (int32_t max_iter=1000) |
Protected Attributes | |
float64_t | C1 |
float64_t | C2 |
bool | use_bias |
float64_t | epsilon |
int32_t | max_iterations |
LIBLINEAR_SOLVER_TYPE | liblinear_solver_type |
CLibLinear | ( | LIBLINEAR_SOLVER_TYPE | liblinear_solver_type | ) |
constructor
liblinear_solver_type | liblinear_solver_type |
Definition at line 24 of file LibLinear.cpp.
CLibLinear | ( | float64_t | C, | |
CDotFeatures * | traindat, | |||
CLabels * | trainlab | |||
) |
constructor
C | constant C | |
traindat | training features | |
trainlab | training labels |
Definition at line 34 of file LibLinear.cpp.
~CLibLinear | ( | ) | [virtual] |
Definition at line 45 of file LibLinear.cpp.
bool get_bias_enabled | ( | ) |
float64_t get_C1 | ( | ) |
float64_t get_C2 | ( | ) |
virtual EClassifierType get_classifier_type | ( | ) | [virtual] |
get classifier type
Reimplemented from CClassifier.
Definition at line 90 of file LibLinear.h.
float64_t get_epsilon | ( | ) |
LIBLINEAR_SOLVER_TYPE get_liblinear_solver_type | ( | ) |
Definition at line 66 of file LibLinear.h.
int32_t get_max_iterations | ( | ) |
get the maximum number of iterations liblinear is allowed to do
Definition at line 139 of file LibLinear.h.
virtual const char* get_name | ( | ) | const [virtual] |
void set_bias_enabled | ( | bool | enable_bias | ) |
set if bias shall be enabled
enable_bias | if bias shall be enabled |
Definition at line 127 of file LibLinear.h.
void set_epsilon | ( | float64_t | eps | ) |
void set_liblinear_solver_type | ( | LIBLINEAR_SOLVER_TYPE | st | ) |
Definition at line 71 of file LibLinear.h.
void set_max_iterations | ( | int32_t | max_iter = 1000 |
) |
set the maximum number of iterations liblinear is allowed to do
Definition at line 145 of file LibLinear.h.
bool train | ( | CFeatures * | data = NULL |
) | [virtual] |
train linear 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) |
Reimplemented from CClassifier.
Definition at line 49 of file LibLinear.cpp.
C1
Definition at line 161 of file LibLinear.h.
C2
Definition at line 163 of file LibLinear.h.
epsilon
Definition at line 167 of file LibLinear.h.
LIBLINEAR_SOLVER_TYPE liblinear_solver_type [protected] |
solver type
Definition at line 172 of file LibLinear.h.
int32_t max_iterations [protected] |
maximum number of iterations
Definition at line 169 of file LibLinear.h.
bool use_bias [protected] |
if bias shall be used
Definition at line 165 of file LibLinear.h.