r - Error while trying to target in arules (data is in the format of web addresses) -
i've imported data r transactions, when try targeting specific website, error:
error in asmethod(object) : facebook.com unknown item label
is there reason why happening? here snippet of code:
target.conf80 = apriori(trans, parameter = list(supp=.002,conf=.8), appearance = list(default="lhs",rhs = "facebook.com"), control = list(verbose = f)) target.conf80 = sort(target.conf80,decreasing=true,by="confidence") inspect(target.conf80[1:10])
thanks!
here transactions like:
1 {v1=google, v2=google web search, v3=facebook.com} 1 2 {v1=facebook.com, v2=mcafee.com, v3=7eer.net, v4=google} 2 3 {v1=mcafee.com,
the problem way read/convert data transactions. transactions should like:
1 {google, google web search, facebook.com} 1 2 {facebook.com, mcafee.com, 7eer.net, google} 2 3 {mcafee.com, ...
without v1, v2, etc. in transactions v1=google
, v4=google
different items.
Comments
Post a Comment