使用arules包中的apriori()函数进行频繁项集挖掘,支持度设置的太小的时候报错。
<br />
#trans条数87w<br />
> trans<br />
transactions in sparse format with<br />
871307 transactions (rows) and<br />
157913 items (columns)<br />
#支持度设置为0.00002<br />
> result=apriori(trans,parameter=list(supp=0.00002,conf=0.85,minlen=2,maxlen=6))<br />
#可以得到result有127条,太少了<br />
> result<br />
set of 127 rules<br />
#把supp设置为0.00001的时候却报错<br />
> result=apriori(trans,parameter=list(supp=0.00001,conf=0.85,minlen=2,maxlen=6))</p>
<p>parameter specification:<br />
confidence minval smax arem aval originalSupport support minlen maxlen target ext<br />
0.85 0.1 1 none FALSE TRUE 1e-05 2 6 rules FALSE</p>
<p>algorithmic control:<br />
filter tree heap memopt load sort verbose<br />
0.1 TRUE TRUE FALSE TRUE 2 TRUE</p>
<p>apriori - find association rules with the apriori algorithm<br />
version 4.21 (2004.05.09) (c) 1996-2004 Christian Borgelt<br />
set item appearances ...[0 item(s)] done [0.00s].<br />
set transactions ...[157913 item(s), 871307 transaction(s)] done [0.95s].<br />
sorting and recoding items ... [43730 item(s)] done [0.09s].<br />
creating transaction tree ... done [1.41s].<br />
checking subsets of size 1<br />
错误于apriori(trans, parameter = list(supp = 1e-05, conf = 0.85, minlen = 2, :<br />
internal error in trio library<br />
好像是supp不能设置的太小,怎么办呢?
</p>