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
3dd4a3f9
Unverified
Commit
3dd4a3f9
authored
Jun 03, 2021
by
shiyu1994
Committed by
GitHub
Jun 02, 2021
Browse files
skip empty bin when calculating cnt_in_bin in BinMapper::FindBin (fix #4301) (#4325)
parent
36957ed5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/io/bin.cpp
src/io/bin.cpp
+1
-1
No files found.
src/io/bin.cpp
View file @
3dd4a3f9
...
@@ -411,7 +411,7 @@ namespace LightGBM {
...
@@ -411,7 +411,7 @@ namespace LightGBM {
cnt_in_bin
.
resize
(
num_bin_
,
0
);
cnt_in_bin
.
resize
(
num_bin_
,
0
);
int
i_bin
=
0
;
int
i_bin
=
0
;
for
(
int
i
=
0
;
i
<
num_distinct_values
;
++
i
)
{
for
(
int
i
=
0
;
i
<
num_distinct_values
;
++
i
)
{
if
(
distinct_values
[
i
]
>
bin_upper_bound_
[
i_bin
])
{
while
(
distinct_values
[
i
]
>
bin_upper_bound_
[
i_bin
]
&&
i_bin
<
num_bin_
-
1
)
{
++
i_bin
;
++
i_bin
;
}
}
cnt_in_bin
[
i_bin
]
+=
counts
[
i
];
cnt_in_bin
[
i_bin
]
+=
counts
[
i
];
...
...
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