好多算法之类的,看理论描述,让人似懂非懂,代码走一走,现象就了然了. 引: from sklearn import tree names = ['size', 'scale', 'fruit', 'butt'] labels = [1,1,1,1,1,0,0,0] p1 = [2,1,0,1] p2 = [1,1,0,1] p3 = [1,1,0,0] p4 = [1,1,0,0] n1 = [0,0,0,0] n2 = [1,0,0,0] n3 = [0,0,1,0] n4 = [1,1,0,…