I have two datasets including training and test. For training dataset, I extracted many association rules as below. Now I would like to use these rules for test transaction dataset. I need to find transaction ids which match these rules. Help me!
library("arules");
candidates<-read.transactions(file="D:\\Ranker\\Candidates.csv",rm.duplicates=TRUE, format="single",sep=",",col=c(1,2));
candidates.test<-read.transactions(file="D:\\Ranker\\Candidates_test.csv",rm.duplicates=TRUE, format="single",sep=",",col=c(1,2));
rules <- apriori(candidates, parameter = list(supp=0.0000001, conf=1, target="rules"),appearance = list(rhs=c("no"),default="lhs"))
Perhaps I am completely off mark, but I think that the generated model already contains the information you are looking for.
You can inspect(candidates[1 : 20])
and take note of the confidence and lift as well as inspect(sort(candidates, by = "lift") [1 : 20])