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
82033064
Unverified
Commit
82033064
authored
Sep 05, 2023
by
mjmckp
Committed by
GitHub
Sep 04, 2023
Browse files
Fix updates in random forest model using GOSS data sample strategy (#6017)
parent
5ea00579
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/boosting/rf.hpp
src/boosting/rf.hpp
+6
-0
No files found.
src/boosting/rf.hpp
View file @
82033064
...
@@ -115,6 +115,12 @@ class RF : public GBDT {
...
@@ -115,6 +115,12 @@ class RF : public GBDT {
const
data_size_t
bag_data_cnt
=
data_sample_strategy_
->
bag_data_cnt
();
const
data_size_t
bag_data_cnt
=
data_sample_strategy_
->
bag_data_cnt
();
const
std
::
vector
<
data_size_t
,
Common
::
AlignmentAllocator
<
data_size_t
,
kAlignedSize
>>&
bag_data_indices
=
data_sample_strategy_
->
bag_data_indices
();
const
std
::
vector
<
data_size_t
,
Common
::
AlignmentAllocator
<
data_size_t
,
kAlignedSize
>>&
bag_data_indices
=
data_sample_strategy_
->
bag_data_indices
();
// GOSSStrategy->Bagging may modify value of bag_data_cnt_
if
(
is_use_subset
&&
bag_data_cnt
<
num_data_
)
{
tmp_grad_
.
resize
(
num_data_
);
tmp_hess_
.
resize
(
num_data_
);
}
CHECK_EQ
(
gradients
,
nullptr
);
CHECK_EQ
(
gradients
,
nullptr
);
CHECK_EQ
(
hessians
,
nullptr
);
CHECK_EQ
(
hessians
,
nullptr
);
...
...
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