Unverified Commit 56c1e2ed authored by Guolin Ke's avatar Guolin Ke Committed by GitHub
Browse files

avoid min_data and min_hessian are zeros at the same time (#3492)

* check min_data and min_hessian

* Apply suggestions from code review
parent 831c0e3f
......@@ -359,6 +359,12 @@ void Config::CheckParamConflict() {
if (max_depth > 0 && monotone_penalty >= max_depth) {
Log::Warning("Monotone penalty greater than tree depth. Monotone features won't be used.");
}
if (min_data_in_leaf <= 0 && min_sum_hessian_in_leaf <= kEpsilon) {
Log::Warning(
"Cannot set both min_data_in_leaf and min_sum_hessian_in_leaf to 0. "
"Will set min_data_in_leaf to 1.");
min_data_in_leaf = 1;
}
}
std::string Config::ToString() const {
......
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