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.
2 Answers
$\begingroup$
$\endgroup$
0
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.
$\begingroup$
$\endgroup$
3
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
-
$\begingroup$ As I mentioned in my post- I can only use the packages that are in the native distribution already. No pip install. $\endgroup$– zsad512Commented Aug 1, 2017 at 2:32
-
$\begingroup$ You could get Orange3-Associate into conda-forge, or is this, being a separate conda channel, also forbidden? $\endgroup$– K3---rncCommented Aug 1, 2017 at 10:29
-
$\begingroup$ Forbidden :( Otherwise the project would be much simpler $\endgroup$– zsad512Commented Aug 1, 2017 at 14:19