fix multiple evaluation metrics

This commit is contained in:
Vadim Khotilovich 2016-05-31 08:20:17 -05:00
parent 51154f42fe
commit 64b9dcf7b5

View File

@ -33,7 +33,10 @@ class Booster {
inline void SetParam(const std::string& name, const std::string& val) {
auto it = std::find_if(cfg_.begin(), cfg_.end(),
[&name](decltype(*cfg_.begin()) &x) {
[&name, &val](decltype(*cfg_.begin()) &x) {
if (name == "eval_metric") {
return x.first == name && x.second == val;
}
return x.first == name;
});
if (it == cfg_.end()) {