0

How does the apriori algorithm work when it lists a rule like :

{U-41} => {U-39} 0.25    1          4.000000
{U-39} => {U-41} 0.25    1          4.000000
{U-41} => {U-40} 0.25    1          1.333333
{U-39} => {U-40} 0.25    1          1.333333

Why it not available in the LHS the {U-40} ? How can I in fact filter the rule by {U-40} in the LHS if it is not mentioned there ?

His is my data

ID  PRODUCT
200001047;U-39
200001047;U-40
200001047;U-41
200003868;U-40
200007480;U-40
200007481;U-0 

And this is the R code I have used

library(arules)
csv <- read.csv("C:/prova.csv",header=FALSE, sep=";")
dt <- as(csv,"data.frame")
colnames(dt) <- c("ID", "PRODUCT")    
sl <- split(dt$PRODUCT,dt$ID)
tran <- as(sl,"transactions") 
rules <- apriori(tran, parameter = list(minlen=2, target="rules"))
inspect(rules)

Thanks, Duilio

1

1 Answer 1

0

I am not sure that I understand your question. Would you expect to see U-40 in the lhs? With your dataset the confidence of these rules is very low. You will have to reduce minimum confidence.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.