Skip to content

Commit

Permalink
修改 py3 语法错误
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzhonglian committed Oct 16, 2018
1 parent c6f934f commit 43394bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/py3.x/ml/12.FrequentPattemTree/fpGrowth.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def mineTree(inTree, headerTable, minSup, preFix, freqItemList):
"""
# 通过value进行从小到大的排序, 得到频繁项集的key
# 最小支持项集的key的list集合
bigL = [v[0] for v in sorted(headerTable.items(), key=lambda p: p[1])]
bigL = [v[0] for v in sorted(headerTable.items(), key=lambda p: p[1][0])]
print('-----', sorted(headerTable.items(), key=lambda p: p[1][0]))
print('bigL=', bigL)
# 循环遍历 最频繁项集的key,从小到大的递归寻找对应的频繁项集
Expand Down

0 comments on commit 43394bf

Please sign in to comment.