← Lessons

quiz vs the machine

Platinum1750

Machine Learning

Association Rule Mining

Discovering if then patterns among items using support confidence and lift.

5 min read · advanced · beat Platinum to climb

Association Rule Mining

Association rule mining finds if then patterns in transactional data, such as which items tend to be bought together. A rule has the form if a customer buys X then they also buy Y.

Three core metrics

Rules are judged by three numbers.

  • Support is the fraction of all transactions that contain both X and Y. It measures how common the pattern is.
  • Confidence is the fraction of transactions containing X that also contain Y. It measures how reliable the rule is.
  • Lift compares the rule to chance. It is the confidence divided by the overall frequency of Y.

Reading lift

Lift is the key honesty check.

  • Lift above one means X and Y appear together more than expected, a genuine association.
  • Lift equal to one means they are independent.
  • Lift below one means buying X makes Y less likely.

A rule can have high confidence yet a lift near one simply because Y is popular everywhere, so confidence alone can mislead.

The workflow

You first find frequent itemsets whose support clears a threshold, then turn those itemsets into rules that meet a confidence threshold, and finally rank the survivors by lift.

Key idea

Association rule mining surfaces if then item patterns scored by support, confidence, and lift, where lift above one signals a real association.

Check yourself

Answer to earn rating on the learn ladder.

1. What does confidence of a rule if X then Y measure?

2. What does a lift greater than one indicate?

3. Why is confidence alone sometimes misleading?