1.1 KiB
1.1 KiB
Introduction to Association Rules
Association Rule Mining is a technique to find relationships between items in a large dataset.
- Classic Example: "Market Basket Analysis" - finding what products customers buy together.
- Example: "If a customer buys Bread, they are 80% likely to buy Butter."
Key Concepts
1. Itemset
- A collection of one or more items.
- Example:
{Milk, Bread, Diapers}
2. Support (Frequency)
- How often an itemset appears in the database.
- Formula:
\text{Support}(A) = \frac{\text{Transactions containing } A}{\text{Total Transactions}} - Example: If Milk appears in 4 out of 5 transactions, Support = 80%.
3. Confidence (Reliability)
- How likely item B is purchased when item A is purchased.
- Formula:
\text{Confidence}(A \to B) = \frac{\text{Support}(A \cup B)}{\text{Support}(A)} - Example: If Milk and Bread appear together in 3 transactions, and Milk appears in 4:
- Confidence(Milk -> Bread) = 3/4 = 75%.
4. Frequent Itemset
- An itemset that meets a minimum Support Threshold (e.g., must appear at least 3 times).