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
ad7f2851
"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "80a9a9419c28c728fb73d03090bc0ae1e9b50386"
Unverified
Commit
ad7f2851
authored
May 11, 2020
by
Guolin Ke
Committed by
GitHub
May 11, 2020
Browse files
fix goss bug (#3063)
parent
1b4cddfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
src/boosting/goss.hpp
src/boosting/goss.hpp
+21
-1
No files found.
src/boosting/goss.hpp
View file @
ad7f2851
...
...
@@ -127,7 +127,27 @@ class GOSS: public GBDT {
bag_data_cnt_
=
num_data_
;
// not subsample for first iterations
if
(
iter
<
static_cast
<
int
>
(
1.0
f
/
config_
->
learning_rate
))
{
return
;
}
GBDT
::
Bagging
(
iter
);
auto
left_cnt
=
bagging_runner_
.
Run
<
true
>
(
num_data_
,
[
=
](
int
,
data_size_t
cur_start
,
data_size_t
cur_cnt
,
data_size_t
*
left
,
data_size_t
*
)
{
data_size_t
cur_left_count
=
0
;
cur_left_count
=
BaggingHelper
(
cur_start
,
cur_cnt
,
left
);
return
cur_left_count
;
},
bag_data_indices_
.
data
());
bag_data_cnt_
=
left_cnt
;
// set bagging data to tree learner
if
(
!
is_use_subset_
)
{
tree_learner_
->
SetBaggingData
(
nullptr
,
bag_data_indices_
.
data
(),
bag_data_cnt_
);
}
else
{
// get subset
tmp_subset_
->
ReSize
(
bag_data_cnt_
);
tmp_subset_
->
CopySubrow
(
train_data_
,
bag_data_indices_
.
data
(),
bag_data_cnt_
,
false
);
tree_learner_
->
SetBaggingData
(
tmp_subset_
.
get
(),
bag_data_indices_
.
data
(),
bag_data_cnt_
);
}
}
};
...
...
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