简体   繁体   English

如何读取随机森林的拟合结果? 学习

[英]How to read the fitting result of Random Forest ? sklearn

I mean the result, not the theory:我的意思是结果,而不是理论:

In linear regression, there is a formula to explain the variables and weights that contribute the final score.在线性回归中,有一个公式可以解释对最终得分有贡献的变量和权重。 In decision tree, there is a path map to explain what conditions result in the segmentation.在决策树中,有一个路径图来解释什么条件会导致分割。

The only result I can read from < from sklearn.tree import DecisionTreeRegressor> is by pickle.dump.我可以从 < from sklearn.tree import DecisionTreeRegressor> 读取的唯一结果是 pickle.dump。 But pickle is still a black-box.但是泡菜仍然是一个黑匣子。 Although features_importance_ output explains the weight importance of each features, however, that's an indirect method.虽然 features_importance_ 输出解释了每个特征的权重重要性,但是,这是一种间接方法。 I still cannot understand how the score come from.我还是不明白分数是怎么来的。

How read the data and explain the fitting result of Random Forest directly?如何读取数据,直接解释随机森林的拟合结果? Is there any formula or path map?有公式或路径图吗?

With sklearn.tree.export_graphviz and dot you can visualize the decision making process.使用sklearn.tree.export_graphvizdot您可以可视化决策过程。 It's a little tricky to implement but that's a way to read the fitting result.实现起来有点棘手,但这是一种读取拟合结果的方法。 Read more here . 在这里阅读更多。

在此处输入图片说明

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

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