Question: Exercise 1 1 : Your task. ( basket _ rules _ test: 4 points ) . Your final task in this notebook is to mine

Exercise 11: Your task. (basket_rules_test: 4 points). Your final task in this notebook is to mine this dataset for pairwise association rules. In particular, your code should produce (no pun intended!) a final dictionary, basket_rules, that meet these conditions (read carefully!):
The keys are pairs (a,b)
, where a
and b
are item names (as strings).
The values are the corresponding confidence scores, conf(ab)
.
Only include rules ab
where item a
occurs at least MIN_COUNT times and conf(ab)
is at least THRESHOLD.
Pay particular attention to Condition 3: not only do you have to filter by a confidence threshold, but you must exclude rules ab
where the item a
does not appear "often enough." There is a code cell below that defines values of MIN_COUNT and THRESHOLD, but your code should work even if we decide to change those values later on.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!