【发布时间】:2017-08-14 18:06:40
【问题描述】:
我正在使用先验算法为我的商品创建分组/购物篮。以下是将此数据集转换为事务类类型后的摘要。
我认为我的错误与 apriori 函数中选择的参数有关。任何见解都会很棒。
summary(groceries)
transactions as itemMatrix in sparse format with
57 rows (elements/itemsets/transactions) and
817 columns (items) and a density of 0.03135133
most frequent items:
A B C D (Other)
13 13 13 12 12 1397
element (itemset/transaction) length distribution:
sizes
3 4 5 6 7 8 9 10 13 14 16 17 18 22 29 30 32 33 34 40 43 45 55 77 86 111 118 353
7 4 4 4 3 4 4 3 1 3 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1
Min. 1st Qu. Median Mean 3rd Qu. Max.
3.00 5.00 9.00 25.61 29.00 353.00
includes extended item information - examples:
labels
1 E
2 F
3 G
groceryrules<-apriori(groceries,
parameter = list(support = 0.15,
confidence = 0.05,
minlen = 2))
运行它时效果很好,但是当我尝试降低支持时,因为没有显示太多建议,它不起作用。
我试过了:
groceryrules<-apriori(groceries,
parameter = list(support = 0.14,
confidence = 0.05,
minlen = 2))
Apriori
Parameter specification:
confidence minval smax arem aval originalSupport maxtime support minlen maxlen target ext
0.05 0.1 1 none FALSE TRUE 5 0.14 2 10 rules FALSE
Algorithmic control:
filter tree heap memopt load sort verbose
0.1 TRUE TRUE FALSE TRUE 2 TRUE
Absolute minimum support count: 7
set item appearances ...[0 item(s)] done [0.00s].
set transactions ...[817 item(s), 57 transaction(s)] done [0.00s].
sorting and recoding items ... [14 item(s)] done [0.00s].
creating transaction tree ... done [0.00s].
checking subsets of size 1 2 3 4 5 done [0.00s].
writing ... [90 rule(s)] done [0.00s].
creating S4 object ... done [0.00s].
Warning message:
In apriori(groceries, parameter = list(support = 0.14, confidence = 0.05, :
Mining stopped (maxlen reached). Only patterns up to a length of 5 returned!
为什么要更改支持,但这么少的数量会导致错误?
【问题讨论】:
-
not enough memory. Increase minimum support!? -
错误是什么?它在哪里?
-
它说挖矿停止了,所以我假设它没有完全完成功能