The apriori algorithm is an iterative and multiphase algorithm used to generate association rules. It is based on a generation-and-test approach.
Before executing the apriori algorithm, we need to define two variables: supportthreshold and Confidencethreshold.
The algorithm consists of the following two phases:
- Candidate-generation phase: It generates the candidate itemsets, which contain sets of all itemsets above supportthreshold.
- Filter phase: It filters out all rules below the expected confidencethreshold.
After filtering, the resulting rules are the answer.