瀏覽代碼

use of max_samples param

Jérôme BUISINE 3 年之前
父節點
當前提交
908bbd7f91
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      find_best_attributes_surrogate.py

+ 1 - 1
find_best_attributes_surrogate.py

@@ -173,7 +173,7 @@ def main():
             x_test_filters = self._data['x_test'].iloc[:, indices]
             
             # model = _get_best_model(x_train_filters, y_train_filters)
-            model = RandomForestClassifier(n_estimators=300, class_weight='balanced', n_jobs=-1)
+            model = RandomForestClassifier(n_estimators=500, class_weight='balanced', bootstrap=True, max_samples=0.75, n_jobs=-1)
             model = model.fit(x_train_filters, y_train_filters)
             
             y_test_model = model.predict(x_test_filters)