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
Two examples using FP-growth to discover frequent sets are provided in
kosarak.dat from here.
- Machine Learning in Action, Peter Harrington
- My blog in Chinese