Commit 2e100eeb authored by wxchan's avatar wxchan Committed by Guolin Ke
Browse files

not check metrics w/o eval set (#212)

parent 011fe024
......@@ -564,7 +564,7 @@ class LGBMClassifier(LGBMModel, LGBMClassifierBase):
if self.n_classes > 2:
# Switch to using a multiclass objective in the underlying LGBM instance
self.objective = "multiclass"
if eval_set is not None and eval_metric == "binary_logloss":
if eval_metric == "binary_logloss":
eval_metric = "multi_logloss"
if eval_set is not None:
......
......@@ -147,6 +147,7 @@ void OverallConfig::CheckParamConflict() {
Log::Fatal("Number of classes must be 1 for non-multiclass training");
}
}
if (boosting_config.is_provide_training_metric || !io_config.valid_data_filenames.empty()) {
for (std::string metric_type : metric_types) {
bool metric_type_multiclass = (metric_type == std::string("multi_logloss") || metric_type == std::string("multi_error"));
if ((objective_type_multiclass && !metric_type_multiclass)
......@@ -154,6 +155,7 @@ void OverallConfig::CheckParamConflict() {
Log::Fatal("Objective and metrics don't match");
}
}
}
if (network_config.num_machines > 1) {
is_parallel = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment