Closed mhahsler closed 7 years ago
This was indeed a bug. Resolution: Added missing parentheses in kappa calculation and fixed equation for least contradiction. The fix is now available in the development version on github and will be part of the next release (arules 1.2-3).
My name is Feng, I am using your arules packages 1.5.2 to find the related products in my retail data. Now, I am confused about two measures in the function interestMeasure: kappa and leastContradiction.
In the package manual, there is a piece of code of explaining how to use interestMeasure. I change the code a little bit:
data("Income") rules <- apriori(Income) quality(rules)$kappa <- interestMeasure(rules,measure='kappa',transactions = Income) quality(rules)$leastContradiction <- interestMeasure(rules,measure='leastContradiction',transactions = Income) try <- as(rules,'data.frame')
Then, we can see the ranges of these two measures are:
You can see the range of kappa is so different from what the manual describes: [-1,1]
When I use these two measures on my own data, I have:
Could you please explain to me how to use these two measures? Thanks a lot
Feng