更新视频注解

This commit is contained in:
jiangzhonglian
2017-03-18 21:55:28 +08:00
parent fc481871c4
commit 7c41123de9
2 changed files with 2 additions and 2 deletions

View File

@@ -185,7 +185,7 @@ def classify(inputTree, featLabels, testVec):
Args:
inputTree 决策树模型
featLabels label标签对应的名称
featLabels Feature标签对应的名称
testVec 测试输入的数据
Returns:
classLabel 分类的结果值需要映射label才能知道名称
@@ -241,7 +241,7 @@ if __name__ == "__main__":
myTree = createTree(myDat, copy.deepcopy(labels))
print myTree
# [1, 1]表示要取的分支上的节点位置,对应的结果值
print classify(myTree, labels, [1, 1])
# print classify(myTree, labels, [1, 1])
# 画图可视化展现
dtPlot.createPlot(myTree)