From adc1004f9a7d8636a87563885e663e59631ae71a Mon Sep 17 00:00:00 2001 From: Guolin Ke Date: Fri, 30 Nov 2018 13:36:57 +0800 Subject: [PATCH] Allow feature_fraction=1.0 in random forest mode --- src/boosting/rf.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boosting/rf.hpp b/src/boosting/rf.hpp index de0578754e67..bf9b004741a7 100644 --- a/src/boosting/rf.hpp +++ b/src/boosting/rf.hpp @@ -27,7 +27,7 @@ class RF: public GBDT { void Init(const Config* config, const Dataset* train_data, const ObjectiveFunction* objective_function, const std::vector& training_metrics) override { CHECK(config->bagging_freq > 0 && config->bagging_fraction < 1.0f && config->bagging_fraction > 0.0f); - CHECK(config->feature_fraction < 1.0f && config->feature_fraction > 0.0f); + CHECK(config->feature_fraction <= 1.0f && config->feature_fraction > 0.0f); GBDT::Init(config, train_data, objective_function, training_metrics); if (num_init_iteration_ > 0) {