python - 随机森林分类器导入

标签 python scikit-learn random-forest

我已经安装了带有 scikit-learn 的 Anaconda Python 发行版。 导入 RandomForestClassifier 时:

from sklearn.ensemble import RandomForestClassifier

我有以下错误:

File "C:\Anaconda\lib\site-packages\sklearn\tree\tree.py", line 36, in <module> from . import _tree ImportError: cannot import name _tree

会出现什么问题?

最佳答案

在 sklearn 版本“0.18.1”中

from sklearn.ensemble.forest import RandomForestClassifier

关于python - 随机森林分类器导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29735766/

相关文章:

python - 如何使用替代构建配置 'pip install uwsgi'?

python - psycopg2.编程错误: syntax error at or near "st"\r,

python - 如何用新数据更新 SVM 模型

python - 如何将我们自己的文本数据加载到 scikit 中进行 MeanShift 聚类?

machine-learning - 随机森林分类 weka

python - 从 sklearn 随机森林回归器可视化决策树

python - 在 django 管理过滤器 list_filter 中选择多个选项?

python - 如何为多个 HTML 表单提供单一 View - Django

python - 线性回归预测预测输入数据(测试数据),而不是测试结果

python - 文件未找到错误: [WinError 2] The system cannot find the file specified when using export_graphviz