remove dependency on bst
This commit is contained in:
@@ -79,6 +79,11 @@ class BoostLearner {
|
||||
* \param val value of the parameter
|
||||
*/
|
||||
inline void SetParam(const char *name, const char *val) {
|
||||
// in this version, bst: prefix is no longer required
|
||||
if (strncmp(name, "bst:", 4) != 0) {
|
||||
std::string n = "bst:"; n += name;
|
||||
this->SetParam(n.c_str(), val);
|
||||
}
|
||||
if (!strcmp(name, "silent")) silent = atoi(val);
|
||||
if (!strcmp(name, "prob_buffer_row")) prob_buffer_row = static_cast<float>(atof(val));
|
||||
if (!strcmp(name, "eval_metric")) evaluator_.AddEval(val);
|
||||
@@ -91,7 +96,7 @@ class BoostLearner {
|
||||
if (!strcmp(name, "objective")) name_obj_ = val;
|
||||
if (!strcmp(name, "booster")) name_gbm_ = val;
|
||||
mparam.SetParam(name, val);
|
||||
}
|
||||
}
|
||||
if (gbm_ != NULL) gbm_->SetParam(name, val);
|
||||
if (obj_ != NULL) obj_->SetParam(name, val);
|
||||
if (gbm_ == NULL || obj_ == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user