Assignment Specifications (View All)

Apriori Assignment

This assignment is worth 17% of your overall Homework and Programming Assignments grade.

In this assignment, you are to implement the Apriori algorithm. Your implementation should allow the user to specify a minimum support threshold (minsup), a minimum confidence threshold (minconf), and a maximum number of rules to display at a time (maxrules).

  1. Implement the Apriori algorithm.
  2. Use your algorithm on the Binarized Lenses problem.
    • Run Apriori for 0.1 <= minsup <= 0.8 and 0.1 <= minconf <= 0.6, using increments of 0.1 (i.e., this means you should run the algorithm 48 times).
    • Summarize your findings.
    • Given this additional information about the data, what do your (discovered) associations tell us?
  3. Use your algorithm on the Mirror Symmetry problem.
    • Run Apriori for various combinations of minsup and minconf values.
    • Summarize your findings.
    • This is an artificial problem. Each attribute represents a bit position in a string of 30 bits: Lmost, Lmost1, ..., Lmost14, Rmost14, Rmost13, ..., Rmost1, Rmost and the attribute Symm is 1 if the pattern is symmetric about its center, and 0 otherwise. Given this interpretation, do any of the rules discovered by your Apriori algorithm make sense?
  4. Build your own association task.
    • Design your task so that it contains some simple associations you can check your algorithm against. List these associations.
    • Run Apriori for various combinations of minsup and minconf values.
    • Verify that the associations you designed into the task are discovered by your algorithm.
    • Any surprises?

Turn in a thoughtful, well-written written report (see the guidelines above) that details your experiments and addresses the questions posed above (look carefully at everything to make sure you've covered all the parts of each).