标签:tree nbsp main dict 学习 int fit == ssi
from sklearn import tree
def famel():
featre = [[178,1],[155,0],[177,0],[165,0],[169,1],[160,0]]
lable =[‘male‘,‘female‘,‘male‘,‘female‘,‘male‘,‘female‘]
clf = tree.DecisionTreeClassifier()
clf = clf.fit(featre,lable)
print(clf.predict([[158,0]]))
if __name__ == ‘__main__‘:
famel()
标签:tree nbsp main dict 学习 int fit == ssi
原文地址:http://www.cnblogs.com/seawave/p/7296134.html