简体   繁体   English

如何通过包“ randomForest”获取随机森林中每棵树的OOB错误

[英]How to get OOB error of each tree in a random forest, by package 'randomForest'

Is there any method to get OOB error for each trees in the forest? 是否有任何方法可以获取林中每棵树的OOB错误? The package provides access to 'importanceSD', but I didn't find how to get OOB error for each tree. 该软件包提供对“ importanceSD”的访问,但是我没有找到如何获取每棵树的OOB错误。

OOB errors for each tree are printed in the output when you train the rf. 训练射频时,输出中会打印出每棵树的OOB错误。

(If it's not available afterwards as an attribute on the rf object, you need to programmatically capture the output with capture.output or temporarily redirect stdout to file, then do a little text-processing... see eg this answer ) (如果此后在rf对象上作为属性不可用,则需要使用capture.output以编程方式捕获输出,或临时将stdout重定向到文件,然后进行一些文本处理...参见此答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM