7
$\begingroup$

In its most common form, association rule learning involves a collection of transactions. For each transaction, there is a set of possible items present. If an item is present in a transaction, then $1$ is denoted, else $0$.

Association rule learning then attempts to create "association rules" whereby one can essentially predict if a person buys onions and potatoes, then the will buy hamburgers

$\lbrace\text{onions,potatoes}\rbrace \implies \lbrace\text{hamburger}\rbrace$

MY QUESTION

Can't a Pearson correlation between binary metrics yield the same information? What does association rule learning offer that is different from Pearson's correlation?

$\endgroup$
2
  • 2
    $\begingroup$ Correlation is a measure of how linearly related two vectors are. In your example, onions, potatoes and hamburger is a set of three entities. Correlation cannot directly be used to yield the same result. However, you can perform pairwise correlations on the binary variables. $\endgroup$
    – Arun Jose
    Nov 16, 2016 at 7:32
  • $\begingroup$ I think of "association" as a more general idea than linear (or any?) specific measure (like Pearson's correlation coefficient), namely "How much does knowing about $X$ tell you about $Y$, and vice versa?" $\endgroup$
    – Alexis
    Nov 2, 2023 at 15:09

1 Answer 1

1
$\begingroup$

Example

As @Arun Jose mentioned, correlation is a pairwise measure between two variables. In your case, the dataset would have to contain a variable (column) for each of the items you have to make it binary:

  • 1 for presence
  • 2 for absence
onions potatoes hamburger
1 1 0
1 1 1
1 0 1

In this example, you have 3 observations, but only 1 observation contains all the items of your association rule (observation 2).

The Pearson correlation coefficient can be calculated for the pairs:

pair Pearson correlation
(onion, potatoes) $\frac{2}{3}$
(onion, hamburger) $\frac{2}{3}$
(potatoes, hamburger) $\frac{1}{3}$

Association rules, on the other hand, can contain several variables or all of these variables. Thus, it fundamentally differs from a correlation measure which is only calculated for 2 variables.

See this comparison between Association and correlation in Data Mining for details of both techniques.

Connection between association and correlation

The support for an association rule is defined as

Support

$\frac{\text{number of transactions containing all items of the rule}}{\text{total number of observations}}$

If it is applied to two variables, an association of the type {item_A}⟹{item_B} is the only relevant association rule. This resembles the Jaccard distance metric. But, for binary variables, the Simple matching coefficient for two variables is the same as correlation. This is not a commen measure in Association rules Data Mining, but can be calculated by

Simple Matching coefficient

$\frac{\text{number of transactions containing both or no items of the rule}}{\text{total number of observations}}$

This yields the same result as the Pearson correlation.

Comparison

Both techniques are used for identifying relationships and patterns within your Data.

Association rules yield a kind of pattern of e.g. frequent itemsets or support. This can include abritrarily many different variables in the dataset (generally categorical data). Thus, association rules tell you whether an itemset is fulfills a certain requirement or not (binary outcome) or how well the dataset supports your rule (numerical outcome).

Pearson correlation on the other hand quantifies the linear relationship between 2 variables (numerical outcome).

Main differences

  • The number of variables included in the measure
  • The type of outcome (qualitative vs. quantitative)

As almost always in Statistics and Machine Learning, both techniques have their strenghts in different domains. The appropriate measure for your problem depends on whether you work with numerical data (Pearson correlation) or are interested in including a great number of categorical variables (association rules). For binary/categorical variables, the association rules yield more information than the Pearson correlation.

Conclusion

In your case, the association rules can be used to calculate the Pearson index. But they go beyond that by revealing patterns that include many variables at the same time.

$\endgroup$

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.