Testing AssociationRule Accuracy/Confidence #848
Unanswered
DrMondesire
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have split my data into a training set and a testing set, then generated the itemset (using fpgrowth) and 1000+ association rules of one consequent from the training set. I am interested in labeling the weighted average confidence of each testing basket for purchasing the one consequent (Eggs).
How can I label each testing basket (row) to be the weighted average confidence of each matching rule for Eggs? For instance, I have a training set rule that 70% of the time that the basket has milk and bread, eggs were purchased. So, each testing set's row that has milk and bread will have the value of .7 for the new "avg confidence" column. If there were multiple matching rules for a basket, the row's "avg confidence" would be the weighted average of all matching rule's confidence.
Training Set Rules:
antecedents | consequent | support | confidence
milk, bread | eggs | 14 | 0.7
jam, bacon | eggs | 25 | 0.95
Ideally: Testing Set with new column "avg confidence"
milk | bread | jam | bacon | eggs | avg confidence
1 | 1 | 0 | 0 | 1 | .7
0 | 0 | 1 | 1 | 1 | .95
1 | 1 | 1 | 1 | 1 | .86 (14*.7 + 25*.95)
I have reviewed the issue on How to Check Association Rules... but it does not address my question for evaluating thousands of rules.
Beta Was this translation helpful? Give feedback.
All reactions