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
7a8c4e52
Unverified
Commit
7a8c4e52
authored
Sep 26, 2019
by
Guolin Ke
Committed by
GitHub
Sep 26, 2019
Browse files
fix bug in reset config for dataset (#2453)
* Update feature_histogram.hpp * Update feature_histogram.hpp
parent
70fc45b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/treelearner/feature_histogram.hpp
src/treelearner/feature_histogram.hpp
+4
-0
No files found.
src/treelearner/feature_histogram.hpp
View file @
7a8c4e52
...
...
@@ -748,6 +748,7 @@ class HistogramPool {
OMP_LOOP_EX_END
();
}
OMP_THROW_EX
();
train_data_
=
train_data
;
}
void
ResetConfig
(
const
Config
*
config
)
{
...
...
@@ -755,6 +756,8 @@ class HistogramPool {
#pragma omp parallel for schedule(static, 512) if (size >= 1024)
for
(
int
i
=
0
;
i
<
size
;
++
i
)
{
feature_metas_
[
i
].
config
=
config
;
feature_metas_
[
i
].
monotone_type
=
train_data_
->
FeatureMonotone
(
i
);
feature_metas_
[
i
].
penalty
=
train_data_
->
FeaturePenalte
(
i
);
}
}
/*!
...
...
@@ -823,6 +826,7 @@ class HistogramPool {
std
::
vector
<
int
>
inverse_mapper_
;
std
::
vector
<
int
>
last_used_time_
;
int
cur_time_
=
0
;
const
Dataset
*
train_data_
;
};
}
// 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