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
399710ac
Commit
399710ac
authored
Aug 01, 2017
by
Guolin Ke
Committed by
GitHub
Aug 01, 2017
Browse files
Update gbdt.cpp
parent
f5aa1c9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+5
-5
No files found.
src/boosting/gbdt.cpp
View file @
399710ac
...
@@ -48,6 +48,7 @@ GBDT::GBDT()
...
@@ -48,6 +48,7 @@ GBDT::GBDT()
num_threads_
=
omp_get_num_threads
();
num_threads_
=
omp_get_num_threads
();
}
}
average_output_
=
false
;
average_output_
=
false
;
tree_learner_
=
nullptr
;
}
}
GBDT
::~
GBDT
()
{
GBDT
::~
GBDT
()
{
...
@@ -217,13 +218,12 @@ void GBDT::ResetTrainingData(const Dataset* train_data, const ObjectiveFunction*
...
@@ -217,13 +218,12 @@ void GBDT::ResetTrainingData(const Dataset* train_data, const ObjectiveFunction*
void
GBDT
::
ResetConfig
(
const
BoostingConfig
*
config
)
{
void
GBDT
::
ResetConfig
(
const
BoostingConfig
*
config
)
{
auto
new_config
=
std
::
unique_ptr
<
BoostingConfig
>
(
new
BoostingConfig
(
*
config
));
auto
new_config
=
std
::
unique_ptr
<
BoostingConfig
>
(
new
BoostingConfig
(
*
config
));
early_stopping_round_
=
new_config
->
early_stopping_round
;
early_stopping_round_
=
new_config
->
early_stopping_round
;
shrinkage_rate_
=
new_config
->
learning_rate
;
shrinkage_rate_
=
new_config
->
learning_rate
;
if
(
tree_learner_
!=
nullptr
)
{
ResetBaggingConfig
(
new_config
.
get
());
ResetBaggingConfig
(
new_config
.
get
());
tree_learner_
->
ResetConfig
(
&
new_config
->
tree_config
);
tree_learner_
->
ResetConfig
(
&
new_config
->
tree_config
);
}
gbdt_config_
.
reset
(
new_config
.
release
());
gbdt_config_
.
reset
(
new_config
.
release
());
}
}
...
...
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