Market-basket: calculating support/confidence/lift/rules

How can I calculate support/confidence/lift on a dataset in order to find frequent itemsets and determine association rules, in python? What would be the most effective method for predicting and offering recommendations on a test set of incomplete "shopping carts"? I am limited to the Anaconda distribution so I cant use packages such as orange3, etc.

Topic market-basket-analysis python

Category Data Science


I've done this (using anaconda) with the following libraries.

from mlxtend.frequent_patterns import apriori
from mlxtend.frequent_patterns import association_rules

Have a look here.


Python package Orange3-Associate, which contains functions for mining association rules and seems to be what you are referring to, should be able to be installed on Anaconda's Python distribution with Python's internal pip command, i.e.

pip install orange3-associate

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.