我正在使用通过Anaconda3安装的jupyter。我无法导入DecisionTreeClassifier并得到以下错误。在Ananconda中安装的Python版本-3.7.3。
有人可以在这里帮助我吗?
href='#'
错误消息:
AttributeError跟踪(最近的调用) 最后) 1个进口大熊猫作为PD ----> 2来自sklearn导入树 3 4音乐= pd.read_csv('music.csv') 5 X = music.drop(columns = ['genre'])
〜\ Anaconda3 \ lib \ site-packages \ sklearn \ tree__init __。py在 4“”“ 5 ----> 6从.tree导入DecisionTreeClassifier 7从.tree导入DecisionTreeRegressor 8从.tree导入ExtraTreeClassifier
〜\ Anaconda3 \ lib \ site-packages \ sklearn \ tree \ tree.py在 38从..utils.validation导入check_is_fitted 39 ---> 40 from ._criterion导入标准 来自._splitter的41导入拆分器 从._tree导入42 DepthFirstTreeBuilder
〜\ Anaconda3 \ lib \ site-packages \ sklearn \ tree_splitter.pxd init sklearn.tree._criterion()
〜\ Anaconda3 \ lib \ site-packages \ sklearn \ tree_tree.pxd init sklearn.tree._splitter()
sklearn \ tree_tree.pyx in sklearn.tree._tree()
AttributeError:类型对象'sklearn.tree._tree.TreeBuilder'没有 属性“ reduce_cython ”