Commit 97995dcf authored by Guolin Ke's avatar Guolin Ke
Browse files

fix tests.

parent 5e1a5135
......@@ -41,7 +41,8 @@ GBDT::GBDT()
num_iteration_for_pred_(0),
shrinkage_rate_(0.1f),
num_init_iteration_(0),
boost_from_average_(false) {
boost_from_average_(false),
need_re_bagging_(false) {
#pragma omp parallel
#pragma omp master
{
......@@ -259,16 +260,15 @@ void GBDT::ResetBaggingConfig(const BoostingConfig* config, bool is_change_datas
is_use_subset_ = true;
Log::Debug("use subset for bagging");
}
if (is_change_dataset) {
need_re_bagging_ = true;
}
} else {
bag_data_cnt_ = num_data_;
bag_data_indices_.clear();
tmp_indices_.clear();
is_use_subset_ = false;
}
if (is_change_dataset) {
need_re_bagging_ = true;
}
}
void GBDT::AddValidDataset(const Dataset* valid_data,
......
......@@ -388,7 +388,7 @@ protected:
bool is_constant_hessian_;
std::unique_ptr<ObjectiveFunction> loaded_objective_;
bool average_output_;
bool need_re_bagging_ = false;
bool need_re_bagging_;
};
} // namespace LightGBM
......
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