Unverified Commit cfc5e4fe authored by shiyu1994's avatar shiyu1994 Committed by GitHub
Browse files

store the true split gain in tree model (#3196)

parent ddf8c104
......@@ -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());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment