Subjects data mining

Fp Growth Association Efbac8

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **Problem Statement:** We have customer orders with items and want to find association rules using the FP-GROWTH algorithm. 2. **Given Data:** - Transactions: - S1: Qəhvə, Keks - S2: Çay, Sendviç - S3: Qəhvə, Sendviç - S4: Çay, Keks - S5: Qəhvə, Çay - S6: Qəhvə, Keks, Sendviç - Minimum Support = 33% (at least 2 transactions) - Minimum Confidence = 60% 3. **Step 1: Calculate Support for each item:** - Qəhvə appears in S1, S3, S5, S6 → 4/6 = 66.7% - Keks appears in S1, S4, S6 → 3/6 = 50% - Çay appears in S2, S4, S5 → 3/6 = 50% - Sendviç appears in S2, S3, S6 → 3/6 = 50% All items meet minimum support. 4. **Step 2: Find frequent itemsets of size 2:** - {Qəhvə, Keks}: S1, S6 → 2/6 = 33.3% - {Qəhvə, Çay}: S5 → 1/6 = 16.7% (below support) - {Qəhvə, Sendviç}: S3, S6 → 2/6 = 33.3% - {Keks, Çay}: S4 → 1/6 = 16.7% (below support) - {Keks, Sendviç}: S6 → 1/6 = 16.7% (below support) - {Çay, Sendviç}: S2 → 1/6 = 16.7% (below support) Only {Qəhvə, Keks} and {Qəhvə, Sendviç} meet minimum support. 5. **Step 3: Find frequent itemsets of size 3:** - {Qəhvə, Keks, Sendviç}: S6 → 1/6 = 16.7% (below support) No frequent 3-itemsets. 6. **Step 4: Generate association rules from frequent itemsets:** - From {Qəhvə, Keks}: - Rule: Qəhvə → Keks - Confidence = Support(Qəhvə, Keks) / Support(Qəhvə) = 2/4 = 50% (below 60%) - Rule: Keks → Qəhvə - Confidence = 2/3 = 66.7% (meets 60%) - From {Qəhvə, Sendviç}: - Rule: Qəhvə → Sendviç - Confidence = 2/4 = 50% (below 60%) - Rule: Sendviç → Qəhvə - Confidence = 2/3 = 66.7% (meets 60%) 7. **Step 5: Final association rules meeting minimum confidence:** - Keks → Qəhvə with confidence 66.7% - Sendviç → Qəhvə with confidence 66.7% **Answer:** - Association rules: 1. If a customer orders Keks, they also order Qəhvə (Confidence 66.7%) 2. If a customer orders Sendviç, they also order Qəhvə (Confidence 66.7%) These rules satisfy minimum support and confidence thresholds.