An implementation of apriori algorithm