39 SG_ERROR(
"Specified features are not of type CDotFeatures\n")
47 ASSERT(num_vec==num_train_labels)
51 int32_t num_params=1+2*num_feat+num_vec;
53 memset(params,0,
sizeof(
float64_t)*num_params);
65 for (int32_t i=0; i<num_feat; i++)
66 w[i]=params[1+i]-params[1+num_feat+i];
70 CMath::display_vector(params,num_params,
"params");
72 CMath::display_vector(
w,w_dim,
"w");
73 CMath::display_vector(¶ms[1],w_dim,
"w+");
74 CMath::display_vector(¶ms[1+w_dim],w_dim,
"w-");
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
bool set_time_limit(float64_t 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 void set_features(CDotFeatures *feat)
Features that support dot products among other operations.
virtual int32_t get_dim_feature_space() const =0
static const float64_t epsilon
float64_t get_max_train_time()
virtual bool train_machine(CFeatures *data=NULL)
bool setup_lpm(float64_t C, CSparseFeatures< float64_t > *x, CBinaryLabels *y, bool use_bias)
Class LinearMachine is a generic interface for all kinds of linear machines like classifiers.
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.
virtual void set_bias(float64_t b)
bool has_property(EFeatureProperty p) const