Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 1 1 : Your task. ( basket _ rules _ test: 4 points ) . Your final task in this notebook is to mine
Exercise : Your task. basketrulestest: 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, basketrules, that meet these conditions read carefully!:
The keys are pairs ab
where a
and b
are item names as strings
The values are the corresponding confidence scores, confab
Only include rules ab
where item a
occurs at least MINCOUNT times and confab
is at least THRESHOLD.
Pay particular attention to Condition : 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 MINCOUNT and THRESHOLD, but your code should work even if we decide to change those values later on
Exercise : Your task. basketrulestest: 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, basketrules, that meet these conditions read carefully!:
The keys are pairs
where
a and
are item names as strings
The values are the corresponding confidence scores, conf
Only include rules
where item
a occurs at least MINCOUNT times and
conf is at least THRESHOLD.
Pay particular attention to Condition : not only do you have to filter by a confidence threshold, but you must exclude rules
where the item
a does not appear "often enough." There is a code cell below that defines values of MINCOUNT and THRESHOLD, but your code should work even if we decide
to change those values later on
Aside: Why would an analyst want to enforce Condition
Your solution can use the groceriesfile string variable defined above as its starting point. And since it's in the same notebook, you may, of course, reuse
any of the code you've written above as needed. Lastly, if you feel you need additional code cells, you can create them after the code cell marked for your
solution but before the code marked, ### TEST CODE ###
Your solution can use the groceriesfile string variable defined above as its starting point. And since it's in the same notebook, you may, of course, reuse any of the code you've written above as needed. Lastly, if you feel you need additional code cells, you can create them after the code cell marked for your solution but before the code marked, ### TEST CODE ###
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started