зеркало из https://github.com/microsoft/LightGBM.git
cannot reset random object in reset_parameters
This commit is contained in:
Родитель
9a54ee3eb6
Коммит
fca93b780a
|
@ -57,7 +57,6 @@ public:
|
|||
const std::vector<const Metric*>& training_metrics) {
|
||||
GBDT::ResetTrainingData(config, train_data, object_function, training_metrics);
|
||||
shrinkage_rate_ = 1.0;
|
||||
random_for_drop_ = Random(gbdt_config_->drop_seed);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -46,7 +46,10 @@ void GBDT::ResetTrainingData(const BoostingConfig* config, const Dataset* train_
|
|||
}
|
||||
early_stopping_round_ = new_config->early_stopping_round;
|
||||
shrinkage_rate_ = new_config->learning_rate;
|
||||
random_ = Random(new_config->bagging_seed);
|
||||
// cannot reset seed, only create one time
|
||||
if (gbdt_config_ == nullptr ) {
|
||||
random_ = Random(new_config->bagging_seed);
|
||||
}
|
||||
|
||||
// create tree learner, only create once
|
||||
if (gbdt_config_ == nullptr) {
|
||||
|
|
|
@ -111,7 +111,6 @@ void SerialTreeLearner::ResetConfig(const TreeConfig* tree_config) {
|
|||
}
|
||||
|
||||
histogram_pool_.ResetConfig(tree_config_, train_data_->num_features());
|
||||
random_ = Random(tree_config_->feature_fraction_seed);
|
||||
}
|
||||
|
||||
Tree* SerialTreeLearner::Train(const score_t* gradients, const score_t *hessians) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче