41 bool CLPBoost::init(int32_t num_vec)
44 for (int32_t i=0; i<num_vec; i++)
87 if (valplus>max_val || max_dim==-1)
112 ASSERT(num_vec==num_train_labels)
120 SG_PRINT(
"finished setting up lpboost\n")
125 int32_t num_hypothesis=0;
133 SG_PRINT(
"iteration:%06d violator: %10.17f (>1.0) chosen: %d\n", num_hypothesis, violator, max_dim)
134 if (violator <= 1.0+epsilon && num_hypothesis>1)
136 SG_PRINT(
"converged after %d iterations!\n", num_hypothesis)
161 for (int32_t i=0; i<num_hypothesis; i++)
Class Time that implements a stopwatch based on either cpu time or wall clock time.
Class CCplex to encapsulate access to the commercial cplex general purpose optimizer.
bool init(E_PROB_TYPE t, int32_t timeout=60)
init cplex with problem type t and retry timeout 60 seconds
virtual int32_t get_num_labels() const =0
bool optimize(float64_t *sol, float64_t *lambda=NULL)
virtual int32_t get_num_vectors() const =0
virtual int32_t get_dim_feature_space() const =0
bool setup_lpboost(float64_t C, int32_t num_cols)
static const float64_t epsilon
float64_t cur_time_diff(bool verbose=false)
bool add_lpboost_constraint(float64_t factor, SGSparseVectorEntry< float64_t > *h, int32_t len, int32_t ulen, CBinaryLabels *label)
static void clear_cancel()
SGSparseVector< float64_t > * sfeat
float64_t get_max_train_time()
Class LinearMachine is a generic interface for all kinds of linear machines like classifiers.
static bool cancel_computations()
SGSparseVectorEntry< T > * features
CDynamicArray< int32_t > * dim
bool init(int32_t num_vec)
float64_t find_max_violator(int32_t &max_dim)
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
Binary Labels for binary classification.
const T & get_element(int32_t idx1, int32_t idx2=0, int32_t idx3=0) const
virtual bool train_machine(CFeatures *data=NULL)