[R] How can I compare two apriori rules created from the same dataset
beno|t@v@|||@nt @end|ng |rom no-|og@org
Sun Sep 15 13:46:50 CEST 2019
On Sat, Sep 14, 2019 at 05:27:31PM -0300, Chris Chinedozie wrote:
> I have a dataset and I divided it into 2 datasets RANDOMLY A and B, where A
> is 70% of the main dataset and B is 30%... Then I applied Apriori algorithm
> on the both A and B separately, generating its rules..
My best guess is that you don't want to do that.
Association rules hugely rely on support for building the itemset. And
then confidence for the orientation of the rule.
Both are very simple metrics. Yet if you divide your dataset, this
will lead to very different itemsets due to the algorithm.
> I want to compare rules from dataset A to rules of dataset B
Can you precise « compare »?
> A has the following rules
> B has the following rules
Aren't these itemsets rather than rules?
> A(sex=0,age=1) => B(sex=0,age=1,money=1) returns TRUE
> A(sex=1,age=1,money=0) => B(sex=1,age=1,money=0)) returns TRUE
> A(sex=0,age=2,money=2) => B(sex=1,age=1,money=0) returns FALSE
I don't see rules, nor sense.
Can you clarify?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 866 bytes
Desc: not available
More information about the R-help