Commit 84a7486f authored by Qiwei Ye's avatar Qiwei Ye
Browse files

build passed. adding optional logger #26

parent b752170b
...@@ -208,7 +208,7 @@ void GBDT::Train() { ...@@ -208,7 +208,7 @@ void GBDT::Train() {
std::milli>(end_time - start_time) * 1e-3, iter + 1); std::milli>(end_time - start_time) * 1e-3, iter + 1);
if (is_early_stopping) { if (is_early_stopping) {
// close file with an early-stopping message // close file with an early-stopping message
Log::Stdout("early stopping at iteration %d, the best iteration round is %d", iter + 1, iter + 1 - early_stopping_round_); Log::Info("Early stopping at iteration %d, the best iteration round is %d\d", iter + 1, iter + 1 - early_stopping_round_);
fclose(output_model_file); fclose(output_model_file);
return; return;
} }
......
...@@ -230,7 +230,7 @@ public: ...@@ -230,7 +230,7 @@ public:
auc = accum / (sum_pos *(sum_weights_ - sum_pos)); auc = accum / (sum_pos *(sum_weights_ - sum_pos));
} }
if (output_freq_ > 0 && iter % output_freq_ == 0){ if (output_freq_ > 0 && iter % output_freq_ == 0){
Log::Info("Iteration:%d, %s's %s: %f\n", iter, name, "auc", loss); Log::Info("Iteration:%d, %s's %s: %f\n", iter, name, "auc", auc);
} }
return auc; return auc;
} }
......
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