_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › 郁焔
|
|
[edit]
1 Multi-Dimension Association Rule #age(X, "20...29") ^ income(X, "20K...29K") => buys(X, "CD Player")
[讌讌= 2%, 襤磯= 60%]
[edit]
2 Single-Dimension Association Rule #contains(T, "Computer") => Contains(T, "Software")
[讌讌= 1%, 襤磯= 50%]
[edit]
3 ル碁(Interestingness measure) #讌讌(Support)
if(lift == 1) result = "A B螳 襦 襴曙 蟯螻(: 螻殊, 豢)" else if(lift > 1) result = "A B螳 襦 蟯螻(:觜, 覯)" else if(lift < 1) result = "A B螳 襦 蟯螻(: 讌, 覲觜)" [edit]
4 語 ル碁´り 螳? #
IF(豕讌讌 螻螳 == "襷譟" AND 豕襤磯 螻螳 == "襷譟") Result = "ル碁" ELSE Result = "ル碁´讌"
[edit]
5 R #り 譬 伎..R襦 蟾 覓 襴. SSAS data mining朱 伎 蟆.
http://nicolemargaretwhite.blogspot.kr/2013/11/mining-for-association-rules-in-r.html
--> dataframe朱 蟾 .. 願碓 谿瑚. http://prdeepakbabu.wordpress.com/2010/11/13/market-basket-analysisassociation-rule-mining-using-r-package-arules/
transaction.csv =========== 1001,Choclates 1001,Pencil 1001,Marker 1002,Pencil 1002,Choclates 1003,Pencil 1003,Coke 1003,Eraser 1004,Pencil 1004,Choclates 1004,Cookies 1005,Marker 1006,Pencil 1006,Marker 1007,Pencil 1007,Choclates #install.packages("arules") library("arules") tr = read.transactions(file="c:\\rdata\\transaction.csv", rm.duplicates= FALSE, format="single",sep="," ,cols =c(1,2)); basket_rules <- apriori(tr,parameter = list(sup = 0.5, conf = 0.9,target="rules")) inspect(basket_rules) rules.sorted <- sort(basket_rules, by="lift") inspect(rules.sorted) #install.packages("arulesViz") library(arulesViz) plot(basket_rules) plot(basket_rules, method="graph", control=list(type="items")) plot(basket_rules, method="paracoord", control=list(reorder=TRUE)) r <- sqlQuery(conn, " select tid, items from trnsaction_table ") r.u <- unique(r) head(r.u) r.u <- sapply(r.u, unique) names(r.u) <- paste("Tr", 1:length(r.u), sep="") str(r.u) ru.tr <- as(r.u, "transactions") rules <- apriori(ru.tr, parameter = list(supp = 0.5, conf = 0.9, target = "rules"))
鏤
|
蠏碁所 ロ 讌 襷 碁襯 襴糾 襷 . (れ梗) |