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
cfc5e4fe
Unverified
Commit
cfc5e4fe
authored
Jul 02, 2020
by
shiyu1994
Committed by
GitHub
Jul 02, 2020
Browse files
store the true split gain in tree model (#3196)
parent
ddf8c104
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/treelearner/serial_tree_learner.cpp
src/treelearner/serial_tree_learner.cpp
+4
-2
No files found.
src/treelearner/serial_tree_learner.cpp
View file @
cfc5e4fe
...
...
@@ -577,7 +577,8 @@ void SerialTreeLearner::SplitInner(Tree* tree, int best_leaf, int* left_leaf,
static_cast
<
data_size_t
>
(
best_split_info
.
right_count
),
static_cast
<
double
>
(
best_split_info
.
left_sum_hessian
),
static_cast
<
double
>
(
best_split_info
.
right_sum_hessian
),
static_cast
<
float
>
(
best_split_info
.
gain
),
// store the true split gain in tree model
static_cast
<
float
>
(
best_split_info
.
gain
+
config_
->
min_gain_to_split
),
train_data_
->
FeatureBinMapper
(
inner_feature_index
)
->
missing_type
(),
best_split_info
.
default_left
);
}
else
{
...
...
@@ -613,7 +614,8 @@ void SerialTreeLearner::SplitInner(Tree* tree, int best_leaf, int* left_leaf,
static_cast
<
data_size_t
>
(
best_split_info
.
right_count
),
static_cast
<
double
>
(
best_split_info
.
left_sum_hessian
),
static_cast
<
double
>
(
best_split_info
.
right_sum_hessian
),
static_cast
<
float
>
(
best_split_info
.
gain
),
// store the true split gain in tree model
static_cast
<
float
>
(
best_split_info
.
gain
+
config_
->
min_gain_to_split
),
train_data_
->
FeatureBinMapper
(
inner_feature_index
)
->
missing_type
());
}
...
...
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