3. 연관 규칙 분석을 위한 Apriori 알고리즘 적용하고 시각화하기
# 연관 규칙 발견하기: Apriori 적용, 최소 지지도 0.1%, 최소 신뢰도 80% >>> rules <- apriori(Groceries, parameter = list(supp = 0.001, conf = 0.8)) >>> summary(rules) set of 410 rules rule length distribution (lhs + rhs):sizes 3 4 5 6 29 229 140 12 Min. 1st Qu. Median Mean 3rd Qu. Max. 3.000 4.000 4.000 4.329 5.000 6.000 summary of quality measures: support confidence lift count Min. :0.001017 Min. :0.8000 Min. : 3.131 Min. :10.00 1st Qu.:0.001017 1st Qu.:0.8333 1st Qu.: 3.312 1st Qu.:10.00 Median :0.001220 Median :0.8462 Median : 3.588 Median :12.00 Mean :0.001247 Mean :0.8663 Mean : 3.951 Mean :12.27 3rd Qu.:0.001322 3rd Qu.:0.9091 3rd Qu.: 4.341 3rd Qu.:13.00 Max. :0.003152 Max. :1.0000 Max. :11.235 Max. :31.00 mining info: data ntransactions support confidence Groceries 9835 0.001 0.8 >>> plot(rules)