## 使用關聯性分析來探索臨床或基因表現資料

$computer=>antivirus\_software\[support=60%,confidence=60%\]$

$support(A=>B)=P( A \cup B)$

$confidence(A=>B)=P(B|A)$

```library(arules)
#建立模擬的資料，裡面A和B這兩個item常常一起出現和消失
A <- c(rep(1,200),sample(c(1,0), size=800, replace = TRUE, prob = c(0.1,0.9)))
B <- c(rep(1,200),sample(c(1,0), size=800, replace = TRUE, prob = c(0.1,0.9)))
C <- c(sample(c(1,0), size=1000, replace = TRUE, prob = c(0.1,0.9)))
D <- c(sample(c(1,0), size=1000, replace = TRUE, prob = c(0.1,0.9)))
E <- c(sample(c(1,0), size=1000, replace = TRUE, prob = c(0.1,0.9)))
mimic <- data.frame(A,B,C,D,E)

#轉換成apriri函數可以接受的格式
trans <- as(data.matrix(mimic),"transactions")
rule.iter <- apriori(trans, parameter = list(support=0.2,
minlen = 1,
maxlen = 3,
ext = FALSE,
confidence=0.6,
smax = 1,
arem ="none",
minval = 0.1,
originalSupport = TRUE,
maxtime = 5))
#看運算後的結果
inspect(rule.iter)
```

1. 白話大數據與機器學習, 第十一章
2. 數據挖掘：你必須知道的32個經典案例,第五章/第七章

1. Distance-Enhanced Association Rules for Gene Expression, Proceeding BIOKDD’03 Proceedings of the 3rd International Conference on Data Mining in Bioinformatics, 2003
2. Mining gene expression databases for association rules, Bioinformatics, 2003
3. Integrated analysis of gene expression by association rules discovery, BMC Bioinformatics 2006
4.Efficient mining of association rules for the early diagnosis of Alzheimer’s disease, Physics in Medicine and Biology ,2011
5. icuARM-An ICU Clinical Decision Support System Using Association Rule Mining, IEEE Journal of Translational Engineering in Health and Medicine,2013

7. Association rule mining to detect factors which contribute to heart disease in males and females, Expert Systems with Applications, 2013
8. Validation of an Association Rule Mining-Based Method to Infer Associations Between Medications and Problems, Applied Clinical Informatics, 2013
9. Mining Association Rules in Dengue Gene Sequence with Latent Periodicity, Computational Biology Journal, 2015
10. Dynamic association rules for gene expression data analysis, BMC Genomics, 2015