3
$\begingroup$

I'm reading this awesome page with interest metrics used in Association Rules:
https://michael.hahsler.net/research/association_rules/measures.html

As I have sequential data, I decided to use the arulesSequences from R, which do Sequential Pattern Mining, and create the rules using the SPADE algorithm.
Here are some rules created:

head(as(rules, 'data.frame'))
           rule                              support         confidence         lift
1    <{A}> => <{B}>                        0.026485890       0.13160987      0.8112745
2    <{D}> => <{B}>                        0.009853382       0.03726893      0.2297345
3     <{C}> => <{B}>                       0.063455778       0.10779325      0.6644632
4   <{C},{A}> => <{B}>                     0.018524358       0.24607330      1.5168542
6    <{D}> => <{E}>                        0.015607757       0.14494876      3.1703792
7    <{A}> => <{F}>                        0.011587577       0.05757932      1.2593987

I'm thinking if makes sense to calculate some other metrics, like Chi Squared test (to test the null hypothesis that Lift = 0 for a specific rule), or calculate the Standardized Lift.
And if makes sense, there's some function in this package or in another to calculate these new metrics?
I have my doubts because the cspade() function only creates rules with support, confidence and lift.

$\endgroup$

1 Answer 1

5
$\begingroup$

This book is one of the most useful resources I've found for pattern mining. Chapter 5 (available as a sample chapter) talks about a few properties of interest measures, such as whether the measure is invariant to inversion, scaling, and null addition. When choosing an interest measure it's worth thinking about what conditions are most important.

I'm not overly familiar with R, but the interestMeasure package looks like what you want. Otherwise the networkx package in Python contains some additional interest measures, or implementing them yourself shouldn't be too hard.

$\endgroup$
4
  • 1
    $\begingroup$ This book is really awesome, because details a lot of different measures. I think for my case I habe to use assimetric measures, because the order matters. The interestMeasure function is what I needed, but seems that only work for rules, not sequential rules. $\endgroup$
    – igorkf
    Commented Aug 20, 2020 at 10:38
  • 1
    $\begingroup$ I've used conviction and certainty factor before as asymmetric measures; both have worked well for me, and reduce some of the problems seen with confidence. Calculating them for static rules is very straightforward, they're just based off the item support and the rule support. Rule support should translate directly for sequential rules, but I'm not sure about item support in the sequential case, sorry $\endgroup$
    – Elenchus
    Commented Aug 20, 2020 at 11:29
  • 1
    $\begingroup$ Having our discussion, I found this nice paper, which categorizes measures by assimetric/simetric properties etc. I found very useful: cse.msu.edu/~ptan/papers/IS.pdf $\endgroup$
    – igorkf
    Commented Aug 20, 2020 at 11:47
  • 1
    $\begingroup$ After studying the measure's properties, I decided to use confidence, because confidence is assimetric and null-invariant. If I'm not wrong, this means that 1. $conf(A \rightarrow B) \ne conf(B \rightarrow A)$ (assimetric property) and 2. $conf(A \rightarrow B)$ will not be affected by $supp(\overline{A}, \overline{B})$, where $\overline{}$ means complementary (null-invariant property). These two measures properties matchs with my business design. By the way, thank you very much @Elenchus, because your recommended book opened my eyes to study assimetric measures! $\endgroup$
    – igorkf
    Commented Aug 20, 2020 at 13:29

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.