24 register_parameters();
37 register_parameters();
40 void CFeatureBlockLogisticRegression::init()
56 void CFeatureBlockLogisticRegression::register_parameters()
118 ASSERT(regularization==0 || regularization==1)
124 ASSERT(termination>=0 && termination<=4)
154 for (int32_t i=0; i<n_vecs; i++)
157 slep_options options = slep_options::default_options();
163 options.loss = LOGISTIC;
166 switch (relation_type)
173 options.n_feature_blocks = ind.
vlen-1;
175 SG_ERROR(
"Group of features covers more features than available\n")
177 options.gWeight = SG_MALLOC(
double, options.n_feature_blocks);
178 for (int32_t i=0; i<options.n_feature_blocks; i++)
179 options.gWeight[i] = 1.0;
180 options.mode = FEATURE_GROUP;
181 options.loss = LOGISTIC;
185 SG_FREE(options.gWeight);
188 for (
int i=0; i<n_feats; i++)
189 new_w[i] = result.w[i];
204 options.general =
true;
206 options.ind_t = ind_t.
vector;
208 options.n_nodes = ind_t.
vlen/3;
209 options.n_feature_blocks = ind_t.
vlen/3;
210 options.mode = FEATURE_TREE;
211 options.loss = LOGISTIC;
217 for (
int i=0; i<n_feats; i++)
218 new_w[i] = result.w[i];
226 SG_ERROR(
"Not supported feature relation type\n")
242 SG_ERROR(
"Specified features are not of type CDotFeatures\n")
256 for (int32_t i=0; i<num; i++)