How to get the n_estimator and max_features of the minimum OOB error and use them for optimization?

ε祈祈猫儿з 提交于 2019-12-13 17:19:12

问题


I want to optimize a Random Forest classifier. So, I plotted an OOB error(the code is available in scikit). From this plot, I want to pick the 2 variables (n_estimators and max_features) that give the lowest OOB error. And then use those them to optimize the classifier (a clf.fit).

From the curve it can be seen that with 170 n_estimators and 5 max_features, I get the lowest OOB. But how can I send these 2 values as a clf.fit to the RandomForest? I want to use this technique instead of RandomSearch or GridSearch.

Any idea on where to start?

Thank you.

来源:https://stackoverflow.com/questions/42674758/how-to-get-the-n-estimator-and-max-features-of-the-minimum-oob-error-and-use-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!