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
4bb2f2f8
Unverified
Commit
4bb2f2f8
authored
May 25, 2018
by
Guolin Ke
Committed by
GitHub
May 25, 2018
Browse files
fix a bug in ConstructHistograms (#1400)
parent
1a1262cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/io/dataset.cpp
src/io/dataset.cpp
+5
-1
No files found.
src/io/dataset.cpp
View file @
4bb2f2f8
...
@@ -623,13 +623,17 @@ void Dataset::ConstructHistograms(const std::vector<int8_t>& is_feature_used,
...
@@ -623,13 +623,17 @@ void Dataset::ConstructHistograms(const std::vector<int8_t>& is_feature_used,
used_group
.
reserve
(
num_groups_
);
used_group
.
reserve
(
num_groups_
);
for
(
int
group
=
0
;
group
<
num_groups_
;
++
group
)
{
for
(
int
group
=
0
;
group
<
num_groups_
;
++
group
)
{
const
int
f_cnt
=
group_feature_cnt_
[
group
];
const
int
f_cnt
=
group_feature_cnt_
[
group
];
bool
is_group_used
=
false
;
for
(
int
j
=
0
;
j
<
f_cnt
;
++
j
)
{
for
(
int
j
=
0
;
j
<
f_cnt
;
++
j
)
{
const
int
fidx
=
group_feature_start_
[
group
]
+
j
;
const
int
fidx
=
group_feature_start_
[
group
]
+
j
;
if
(
is_feature_used
[
fidx
])
{
if
(
is_feature_used
[
fidx
])
{
is_group_used
=
true
;
break
;
break
;
}
}
}
}
used_group
.
push_back
(
group
);
if
(
is_group_used
)
{
used_group
.
push_back
(
group
);
}
}
}
int
num_used_group
=
static_cast
<
int
>
(
used_group
.
size
());
int
num_used_group
=
static_cast
<
int
>
(
used_group
.
size
());
auto
ptr_ordered_grad
=
gradients
;
auto
ptr_ordered_grad
=
gradients
;
...
...
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