2012-12-06 17 views
0

我正在处理关联规则挖掘的大型二进制数据矩阵,4547 x 5415。按惯例,每一行都是一个交易,每一列都是一个项目。每当我调用arule包时,它都会引用一些引用trio库的神秘错误消息。有没有人有这种类型的错误的经验?Arules包 - 三重奏错误

i[1:10,1:10] 
    101402 101403 101404 101405 101406 101411 101412 101413 101414 101415 
[1,]  0  0  0  1  0  0  1  0  0  0 
[2,]  0  1  0  0  0  0  1  0  0  0 
[3,]  0  0  0  0  0  0  1  0  0  0 
[4,]  0  0  0  1  0  0  0  0  0  1 
[5,]  0  0  0  1  0  0  0  0  0  1 
[6,]  0  1  0  0  0  1  0  0  0  0 
[7,]  0  0  0  0  0  0  1  0  0  0 
[8,]  0  0  1  0  0  0  0  0  0  1 
[9,]  0  0  0  0  0  1  0  0  0  0 
[10,]  0  0  0  0  1  0  1  0  0  0 



rules <- apriori(i, parameter=list(support=0.001, confidence=0.5)) 

    parameter specification: 
    confidence minval smax arem aval originalSupport support minlen maxlen target 
      0.5 0.1 1 none FALSE   TRUE 0.001  1  10 rules 
     ext 
    FALSE 

    algorithmic control: 
    filter tree heap memopt load sort verbose 
     0.1 TRUE TRUE FALSE TRUE 2 TRUE 

    apriori - find association rules with the apriori algorithm 
    version 4.21 (2004.05.09)  (c) 1996-2004 Christian Borgelt 
    set item appearances ...[0 item(s)] done [0.00s]. 
    set transactions ...[5415 item(s), 4547 transaction(s)] done [0.47s]. 
    sorting and recoding items ... [4908 item(s)] done [0.18s]. 
    creating transaction tree ... done [0.01s]. 
    **checking subsets of size 1 2Error in apriori(i, parameter = list(support = 0.001, confidence = 0.5)) : 
     internal error in trio library** 

重现的例子:

y <- matrix(nrow=4547, ncol=5415) 
y <- apply(y, c(1,2), function(x) sample(c(0,1),1)) 
rules <- apriori(y, parameter=list(support=0.001, confidence=0.5)) 
+0

难以调试没有你的数据,您是否在Epub数据集上测试arules软件包? – agstudy

+0

它使用该数据集和Groceries数据集一起工作。 – user1636475

+0

你能给出一个可重现的数据例子吗? – agstudy

回答

4

的问题是,有错误的包arules处理中的错误。内存不足,并且当apriori代码尝试创建相应的错误消息时,它会反过来创建对printf的无效调用,这是由三重库在Windows下处理的。所以总之你应该得到一个内存不足的错误。

此问题将在arules 1.1-4版中解决。

为了避免用尽你需要增加支持和/或限制的项目集项目数(在列表中的参数MAXLEN)内存

-Michael