Market basket analysis apriori algorithm
Earlier my career I worked for a loyalty card scheme for one of the largest supermarkets in the UK. How to implement a market basket in Python? It creates different tables that includes combinations of items. It scans main dateset that shows all transactions and finds frequencies by considering how many time these combinations occurs in main data-set. It is based on the concept that a subset of a frequent itemset must also be a frequent itemset. Frequent Itemset is an itemset whose support value is greater than a threshold value (support). It can tell you what items do customers frequently buy together by generating a set of rules called Association Rules. Apriori algorithm depends on frequencies of item set. By Annalyn Ng , Ministry of Defence of Singapore. It is used to analyze the frequent itemsets in a transactional database, which then is used to generate association rules between the products. Let’s put it into an example. It uses a bottom-up approach where fr...