简体   繁体   English

Python-如何从 sklearn.tree 导入决策树分类器

[英]Python- How to import DecisionTree Classifier from sklearn.tree

  1. May I know how to import DecisionTreeClassifier from sklearn.tree as there is an error shown: ModuleNotFoundError: No module named 'sklearn'我可以知道如何从sklearn.tree导入DecisionTreeClassifier ,因为显示错误: ModuleNotFoundError: No module named 'sklearn'

  2. Also, every time when I want to import functions like pandas , I need to pip install them which is time-consuming.另外,每次我想导入像pandas这样的功能时,我都需要pip install它们,这很耗时。 Is there any other methods to avoid installing each time for new importing function?有没有其他方法可以避免每次新导入function都安装? ps I have downloaded anaconda already, but not sure if it could work. ps 我已经下载anaconda ,但不确定它是否可以工作。 Much Thanks!非常感谢! 在此处输入图像描述

You need to install the package Sklearn您需要安装 package Sklearn

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

相关问题 如何检查分类器是否属于 sklearn.tree? - How to check if a classifier belongs to sklearn.tree? 如何解决 ImportError: cannot import name 'DesicionTreeClassifier' from 'sklearn.tree' in python? - How to resolve the ImportError: cannot import name 'DesicionTreeClassifier' from 'sklearn.tree' in python? 导入错误:无法从“sklearn.tree”导入名称“tree” - Import Error: cannot import name 'tree' from 'sklearn.tree' 导入错误:无法从“sklearn.tree”导入名称“plot_tree” - ImportError: cannot import name 'plot_tree' from 'sklearn.tree' 当使用来自 sklearn.tree 的 DecisionTreeRegressor 时,model.predict(x.head) 真正预测的是什么? - What is model.predict(x.head) really predicting when using DecisionTreeRegressor from sklearn.tree? 如何使用sklearn.tree输出进行预测的节点? - How can I output the node making a prediction using sklearn.tree? Python sklearn决策树分类器具有多个功能? - Python sklearn decision tree classifier with multiple features? 如何从sklearn朴素贝叶斯分类器获得最佳预测? -蟒蛇 - How to get nbest predictions from sklearn naive bayes classifier? -python 我无法从 python 中的 sklearn 导入树 - I can't import tree from sklearn in python Sklearn分类与DecisionTree,如何提高拟合? - Sklearn classification with DecisionTree, how to improve fit?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM