Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
8ffd8d80
Commit
8ffd8d80
authored
Apr 16, 2019
by
Guolin Ke
Browse files
fix overflow in WeightedPercentile
parent
5b5b9823
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/objective/regression_objective.hpp
src/objective/regression_objective.hpp
+1
-1
No files found.
src/objective/regression_objective.hpp
View file @
8ffd8d80
...
...
@@ -65,7 +65,7 @@ namespace LightGBM {
CHECK(threshold < weighted_cdf[pos]);\
T v1 = data_reader(sorted_idx[pos - 1]);\
T v2 = data_reader(sorted_idx[pos]);\
if (weighted_cdf[pos + 1] - weighted_cdf[pos] >
kEpsilon
) {\
if (weighted_cdf[pos + 1] - weighted_cdf[pos] >
= 1.0f
) {\
return static_cast<T>((threshold - weighted_cdf[pos]) / (weighted_cdf[pos + 1] - weighted_cdf[pos]) * (v2 - v1) + v1); \
} else {\
return static_cast<T>(v2);\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment