Welcome back! In this chapter we will analyze our data from ch 8.
Bad news guys! I can't use greater than or less than signs in the description. So I'm going to indicate the assignment arrow by typing the word ~arrow~ and the pipe as ~pipe~
... picking up where we left off in ch 8...
install.packages("arules")
library(arules)
a ~arrow~ apriori(cg17_dm)
inspect(a)
a1 ~arrow~ apriori(cg17_dm, parameter = list(confidence = 0.5, minlen = 2, maxlen = 16, maxtime = 0, target = "rules"))
mba ~arrow~ apriori(cg17_dm, parameter = list(confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba)
mba_s ~arrow~ apriori(cg17_dm, parameter = list(support=0.01, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_s)
mba_mr ~arrow~ apriori(cg17_dm, parameter = list(support=0.01, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(rhs = "SEX=M", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_mr)
mba_ml ~arrow~ apriori(cg17_dm, parameter = list(support=0.01, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(lhs = "SEX=M", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_ml)
mba_fr ~arrow~ apriori(cg17_dm, parameter = list(support=0.01, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(rhs = "SEX=F", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_fr)
mba_fl ~arrow~ apriori(cg17_dm, parameter = list(support=0.01, confidence = 0.5, minlen = 2, maxlen = 16, maxtime = 0, target = "rules"), appearance = list(lhs = "SEX=F", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_fl)
mba_mrx ~arrow~ apriori(cg17_dm, parameter = list(support=0.001, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(rhs = "SEX=M", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_mrx)
mba_mlx ~arrow~ apriori(cg17_dm, parameter = list(support=0.001, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(lhs = "SEX=M", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_mlx)
mba_frx ~arrow~ apriori(cg17_dm, parameter = list(support=0.001, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(rhs = "SEX=F", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_frx)
mba_flx ~arrow~ apriori(cg17_dm, parameter = list(support=0.001, confidence = 0.5, minlen = 2, maxlen = 15, maxtime = 0, target = "rules"), appearance = list(lhs = "SEX=F", none = c("DEAF=0", "BPHIGH4=0", "DIABETE3=0", "CHCKIDNY=0", "ASTHMA3=0", "HAVARTH3=0", "CVDCRHD4=0", "CVDINFR4=0", "CVDSTRK3=0", "CHCCOPD1=0", "CHCOCNCR=0", "BLIND=0", "X_RFBMI5=0", "X_RFSMOK3=0")), control=list(memopt=TRUE, load=FALSE))
inspect(mba_flx)
Ещё видео!