类似：'ascii' codec can't decode byte 0xe8 in position 0 的报错，请修改fpgrowth.py中的CreatFPtree中的下面两种：
orderedItem = [v for v in sorted(localD.iteritems(), key=lambda p:(p, -ord(p)), reverse=True)]
# orderedItem = [v for v in sorted(localD.iteritems(), key=lambda p:(p, int(p)), reverse=True)]
# FP-growth Algorithm
Codes mainly come from "Machine Learning in Action", please refer to the book if you're interested in.
A bug is found and fixed in `createFPtree` function, i.e., the sorting part.
FP-growth functions are in `fpgrowth.py`.
Two examples using FP-growth to discover frequent sets are provided in `main.py`.
Please download `kosarak.dat` from [here](http://fimi.ua.ac.be/data/).
- Machine Learning in Action, Peter Harrington
- [My blog in Chinese](https://blog.csdn.net/songbinxu/article/details/80411388)