Association Rule Learning is a rule-based unsupervised machine learning approach for finding relationships in large datasets. It checks for the dependency of a variable or event, on another. The goal is to find useful relationships between variables or events.
It works on the concept of if else statements. If you have A then B:
There are 3 algorithms used to generate these rules:
Apriori Algorithm: uses frequent datasets to generate rules, uses breadth- first search and hash trees to calculate the itemset. The primary limitation for it is speed as it can be slow.
F-P Growth Algorithm: The Frequency Pattern Growth Algorithm is an improved version of the Apriori Algorithm. It represents the dataset in a tree structure to get the most frequent patterns. This algorithm is faster and more efficient than Apriori, but is more challenging to build.
Eclat Algorithm: The Equivalence Class Transformation Algorithm uses a depth-first search technique to find frequent itemsets and is faster than Apriori.
Once we have our rule, we have to check the quality to ensure that it is actually usable.
The 3 metrics for checking quality are:
- Support: the frequency of an itemset occurring as a fraction of the total dataset
- Confidence: the probability both events occurring together
- Lift: The probability of an even occurring given another event, to confirm the antecedent and consequent relationship
This Algorithm can be very useful in Market Basket Analysis, as retailers can use these relationships when deciding how to organize their products and display them to customers. It is also useful for stock market analysis, as determining how other stocks affect a stock can help make predictions about the future price.