Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 RandomForest 分类器,在训练和测试模型后,我想从中提取“一些知识”。我知道 RandomForest 结合了许多树的投票......但是有没有办法提取每棵树的解释规则???。
直接从树中提取知识非常困难,因为分类是由多数票做出的。决策规则太难分析了。
相反,您可以分析最终分类模型中每个变量的重要性。你应该看看 的feature_importances_属性RandomForestClassifier。
feature_importances_
RandomForestClassifier
我还建议您阅读原始随机森林论文以获取有关此变量重要性度量的更多信息。
Breiman, Leo. "Random forests." Machine learning 45.1 (2001): 5-32.