class to implement LibLinear
Definition at line 47 of file LibLinear.h.
CLibLinear | ( | void | ) |
default constructor
Definition at line 25 of file LibLinear.cpp.
CLibLinear | ( | LIBLINEAR_SOLVER_TYPE | liblinear_solver_type | ) |
constructor
liblinear_solver_type | liblinear_solver_type |
Definition at line 31 of file LibLinear.cpp.
CLibLinear | ( | float64_t | C, | |
CDotFeatures * | traindat, | |||
CLabels * | trainlab | |||
) |
constructor (using L2R_L1LOSS_SVC_DUAL as default)
C | constant C | |
traindat | training features | |
trainlab | training labels |
Definition at line 38 of file LibLinear.cpp.
~CLibLinear | ( | ) | [virtual] |
destructor
Definition at line 73 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 CMachine.
Reimplemented in CDomainAdaptationSVMLinear.
Definition at line 86 of file LibLinear.h.
float64_t get_epsilon | ( | ) |
LIBLINEAR_SOLVER_TYPE get_liblinear_solver_type | ( | ) |
Definition at line 72 of file LibLinear.h.
get the linear term for qp
Definition at line 1148 of file LibLinear.cpp.
int32_t get_max_iterations | ( | ) |
get the maximum number of iterations liblinear is allowed to do
Definition at line 135 of file LibLinear.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
Reimplemented from CLinearMachine.
Reimplemented in CDomainAdaptationSVMLinear.
Definition at line 132 of file LibLinear.h.
void init_linear_term | ( | ) |
set the linear term for qp
Definition at line 1156 of file LibLinear.cpp.
void set_bias_enabled | ( | bool | enable_bias | ) |
set if bias shall be enabled
enable_bias | if bias shall be enabled |
Definition at line 123 of file LibLinear.h.
void set_epsilon | ( | float64_t | eps | ) |
void set_liblinear_solver_type | ( | LIBLINEAR_SOLVER_TYPE | st | ) |
Definition at line 77 of file LibLinear.h.
set the linear term for qp
Definition at line 147 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 141 of file LibLinear.h.
bool train_machine | ( | CFeatures * | data = NULL |
) | [protected, 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 CMachine.
Definition at line 78 of file LibLinear.cpp.
C1
Definition at line 198 of file LibLinear.h.
C2
Definition at line 200 of file LibLinear.h.
epsilon
Definition at line 204 of file LibLinear.h.
LIBLINEAR_SOLVER_TYPE liblinear_solver_type [protected] |
solver type
Definition at line 212 of file LibLinear.h.
SGVector<float64_t> m_linear_term [protected] |
precomputed linear term
Definition at line 209 of file LibLinear.h.
int32_t max_iterations [protected] |
maximum number of iterations
Definition at line 206 of file LibLinear.h.
bool use_bias [protected] |
if bias shall be used
Definition at line 202 of file LibLinear.h.