addition of unit 1 3 4 5

This commit is contained in:
Akshat Mehta
2025-11-24 16:55:19 +05:30
parent 8f8e35ae95
commit f8aea15aaa
24 changed files with 596 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# 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).