Commit 6c736da9 authored by Guolin Ke's avatar Guolin Ke
Browse files

fix error that sum_hessian may be zero.

parent a4a0235d
......@@ -64,7 +64,7 @@ public:
*/
void FindBestThreshold(double sum_gradient, double sum_hessian, data_size_t num_data,
SplitInfo* output) {
find_best_threshold_fun_(sum_gradient, sum_hessian, num_data, output);
find_best_threshold_fun_(sum_gradient, sum_hessian + 2 * kEpsilon, num_data, output);
if (output->gain > kMinScore) {
is_splittable_ = true;
} else {
......
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