小编Pau*_*eau的帖子

参数中的随机森林分类器对象

我目前正在研究随机森林分类器,使用 gridsearch 来获得最佳参数

所以当我得到我的参数时,它们在我的 var 中:

params = {'bootstrap': 'True', 
          'criterion': 'entropy', 
          'max_depth': 'None', 
          'max_features': '3', 
          'min_samples_leaf': '4', 
          'min_samples_split': '3'}
Run Code Online (Sandbox Code Playgroud)

我想做这样的事情:

clf = RandomForestClassifier(params)

但是这里params代替了n_estimators所以我有一些错误,例如:

ValueError: n_estimators must be an integer, got <class 'dict'>.
Run Code Online (Sandbox Code Playgroud)

python random arguments classification

3
推荐指数
1
解决办法
2284
查看次数

标签 统计

arguments ×1

classification ×1

python ×1

random ×1