标签: python
我正在尝试学习机器学习。当我尝试创建DecisionTreeClassifier时,它说找不到引用DecisionTreeClassifier
DecisionTreeClassifier
import sklearn as tree // Get the error hear clf = tree.DecisionTreeClassifier()
答案 0 :(得分:1)
DecisionTreeClassifier属于tree的{{1}}子模块,因此必须导入它。这应该起作用:
tree
sklearn