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
97995dcf
Commit
97995dcf
authored
Aug 27, 2017
by
Guolin Ke
Browse files
fix tests.
parent
5e1a5135
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+5
-5
src/boosting/gbdt.h
src/boosting/gbdt.h
+1
-1
No files found.
src/boosting/gbdt.cpp
View file @
97995dcf
...
@@ -41,7 +41,8 @@ GBDT::GBDT()
...
@@ -41,7 +41,8 @@ GBDT::GBDT()
num_iteration_for_pred_
(
0
),
num_iteration_for_pred_
(
0
),
shrinkage_rate_
(
0.1
f
),
shrinkage_rate_
(
0.1
f
),
num_init_iteration_
(
0
),
num_init_iteration_
(
0
),
boost_from_average_
(
false
)
{
boost_from_average_
(
false
),
need_re_bagging_
(
false
)
{
#pragma omp parallel
#pragma omp parallel
#pragma omp master
#pragma omp master
{
{
...
@@ -259,16 +260,15 @@ void GBDT::ResetBaggingConfig(const BoostingConfig* config, bool is_change_datas
...
@@ -259,16 +260,15 @@ void GBDT::ResetBaggingConfig(const BoostingConfig* config, bool is_change_datas
is_use_subset_
=
true
;
is_use_subset_
=
true
;
Log
::
Debug
(
"use subset for bagging"
);
Log
::
Debug
(
"use subset for bagging"
);
}
}
if
(
is_change_dataset
)
{
need_re_bagging_
=
true
;
}
}
else
{
}
else
{
bag_data_cnt_
=
num_data_
;
bag_data_cnt_
=
num_data_
;
bag_data_indices_
.
clear
();
bag_data_indices_
.
clear
();
tmp_indices_
.
clear
();
tmp_indices_
.
clear
();
is_use_subset_
=
false
;
is_use_subset_
=
false
;
}
}
if
(
is_change_dataset
)
{
need_re_bagging_
=
true
;
}
}
}
void
GBDT
::
AddValidDataset
(
const
Dataset
*
valid_data
,
void
GBDT
::
AddValidDataset
(
const
Dataset
*
valid_data
,
...
...
src/boosting/gbdt.h
View file @
97995dcf
...
@@ -388,7 +388,7 @@ protected:
...
@@ -388,7 +388,7 @@ protected:
bool
is_constant_hessian_
;
bool
is_constant_hessian_
;
std
::
unique_ptr
<
ObjectiveFunction
>
loaded_objective_
;
std
::
unique_ptr
<
ObjectiveFunction
>
loaded_objective_
;
bool
average_output_
;
bool
average_output_
;
bool
need_re_bagging_
=
false
;
bool
need_re_bagging_
;
};
};
}
// namespace LightGBM
}
// namespace LightGBM
...
...
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