SHOGUN
v1.1.0
|
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).
Public Member Functions | |
CLPBoost () | |
virtual | ~CLPBoost () |
virtual EClassifierType | get_classifier_type () |
bool | init (int32_t num_vec) |
void | cleanup () |
virtual void | set_features (CDotFeatures *feat) |
void | set_C (float64_t c_neg, float64_t c_pos) |
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 Member Functions | |
virtual bool | train_machine (CFeatures *data=NULL) |
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 |
SGSparseVector< 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.
bool get_bias_enabled | ( | ) |
virtual EClassifierType get_classifier_type | ( | ) | [virtual] |
float64_t get_epsilon | ( | ) |
virtual const char* get_name | ( | ) | const [virtual] |
bool init | ( | int32_t | num_vec | ) |
Definition at line 41 of file LPBoost.cpp.
void set_bias_enabled | ( | bool | enable_bias | ) |
void set_epsilon | ( | float64_t | eps | ) |
virtual void set_features | ( | CDotFeatures * | feat | ) | [virtual] |
bool train_machine | ( | CFeatures * | data = NULL | ) | [protected, 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) |
Definition at line 104 of file LPBoost.cpp.
CDynamicArray<int32_t>* dim [protected] |
SGSparseVector<float64_t>* sfeat [protected] |