Class LPBoost trains a linear classifier called Linear Programming Machine, i.e. a SVM using a norm regularizer.
It solves the following optimization problem using Boosting on the input features:
Note that currently CPLEX is required to solve this problem. This implementation is faster than solving the linear program directly in CPLEX (as was done in CLPM).
Definition at line 48 of file LPBoost.h.
Public Member Functions | |
CLPBoost () | |
virtual | ~CLPBoost () |
virtual bool | train (CFeatures *data=NULL) |
virtual EClassifierType | get_classifier_type () |
bool | init (int32_t num_vec) |
void | cleanup () |
virtual void | set_features (CDotFeatures *feat) |
void | set_C (float64_t c1, float64_t c2) |
float64_t | get_C1 () |
float64_t | get_C2 () |
void | set_bias_enabled (bool enable_bias) |
bool | get_bias_enabled () |
void | set_epsilon (float64_t eps) |
float64_t | get_epsilon () |
float64_t | find_max_violator (int32_t &max_dim) |
virtual const char * | get_name () const |
Protected Attributes | |
float64_t | C1 |
float64_t | C2 |
bool | use_bias |
float64_t | epsilon |
float64_t * | u |
CDynamicArray< int32_t > * | dim |
int32_t | num_sfeat |
int32_t | num_svec |
TSparse< float64_t > * | sfeat |
CLPBoost | ( | ) |
Definition at line 25 of file LPBoost.cpp.
~CLPBoost | ( | ) | [virtual] |
Definition at line 36 of file LPBoost.cpp.
void cleanup | ( | ) |
Definition at line 57 of file LPBoost.cpp.
float64_t find_max_violator | ( | int32_t & | max_dim | ) |
Definition at line 69 of file LPBoost.cpp.
virtual EClassifierType get_classifier_type | ( | ) | [virtual] |
virtual const char* get_name | ( | ) | const [virtual] |
bool init | ( | int32_t | num_vec | ) |
Definition at line 41 of file LPBoost.cpp.
virtual void set_features | ( | CDotFeatures * | feat | ) | [virtual] |
bool train | ( | CFeatures * | data = NULL |
) | [virtual] |
train 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 104 of file LPBoost.cpp.
CDynamicArray<int32_t>* dim [protected] |