MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / GetMembersFromString

Method GetMembersFromString

src/io/config_auto.cpp:290–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288});
289
290void Config::GetMembersFromString(const std::unordered_map<std::string, std::string>& params) {
291 std::string tmp_str = "";
292 GetString(params, "data", &data);
293
294 if (GetString(params, "valid", &tmp_str)) {
295 valid = Common::Split(tmp_str.c_str(), ',');
296 }
297
298 GetInt(params, "num_iterations", &num_iterations);
299 CHECK(num_iterations >=0);
300
301 GetDouble(params, "learning_rate", &learning_rate);
302 CHECK(learning_rate >0.0);
303
304 GetInt(params, "num_leaves", &num_leaves);
305 CHECK(num_leaves >1);
306 CHECK(num_leaves <=131072);
307
308 GetInt(params, "num_threads", &num_threads);
309
310 GetInt(params, "max_depth", &max_depth);
311
312 GetInt(params, "min_data_in_leaf", &min_data_in_leaf);
313 CHECK(min_data_in_leaf >=0);
314
315 GetDouble(params, "min_sum_hessian_in_leaf", &min_sum_hessian_in_leaf);
316 CHECK(min_sum_hessian_in_leaf >=0.0);
317
318 GetDouble(params, "bagging_fraction", &bagging_fraction);
319 CHECK(bagging_fraction >0.0);
320 CHECK(bagging_fraction <=1.0);
321
322 GetDouble(params, "pos_bagging_fraction", &pos_bagging_fraction);
323 CHECK(pos_bagging_fraction >0.0);
324 CHECK(pos_bagging_fraction <=1.0);
325
326 GetDouble(params, "neg_bagging_fraction", &neg_bagging_fraction);
327 CHECK(neg_bagging_fraction >0.0);
328 CHECK(neg_bagging_fraction <=1.0);
329
330 GetInt(params, "bagging_freq", &bagging_freq);
331
332 GetInt(params, "bagging_seed", &bagging_seed);
333
334 GetDouble(params, "feature_fraction", &feature_fraction);
335 CHECK(feature_fraction >0.0);
336 CHECK(feature_fraction <=1.0);
337
338 GetDouble(params, "feature_fraction_bynode", &feature_fraction_bynode);
339 CHECK(feature_fraction_bynode >0.0);
340 CHECK(feature_fraction_bynode <=1.0);
341
342 GetInt(params, "feature_fraction_seed", &feature_fraction_seed);
343
344 GetInt(params, "early_stopping_round", &early_stopping_round);
345
346 GetBool(params, "first_metric_only", &first_metric_only);
347

Callers

nothing calls this directly

Calls 1

SplitFunction · 0.50

Tested by

no test coverage detected