addition of unit 1 3 4 5
This commit is contained in:
27
unit 3/01_Association_Rule_Mining.md
Normal file
27
unit 3/01_Association_Rule_Mining.md
Normal 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).
|
||||
Reference in New Issue
Block a user