## 2 Theoretical Framework
### Unsupervised Machine Learning: Clustering and Association Rule Mining  
This section focuses on two types of unsupervised machine learning: clustering and association rule mining. Clustering is a data science technique that identifies patterns within a dataset based on similarities and dissimilarities between different clusters. There are two broad categories of clustering methods: probability-model-based approaches and nonparametric approaches [17]. The K-means clustering algorithm, a classic and efficient method, randomly selects \(k\) sample points as initial cluster centers, calculates the distance between the remaining sample points and the initial centers, assigns each point to the nearest cluster, and iteratively updates the cluster centers until convergence [18].  
The elbow method (EM) and silhouette validation index are commonly used to determine the optimal number of clusters and evaluate the quality of clustering. The EM formula calculates the sum of distances within each cluster and considers the number of points in each cluster [19]. On the other hand, the silhouette validation index, introduced by [PERSON] [20], measures the proximity of each data point to others within the same cluster and evaluates how well clusters are separated. It is based on the distances between points within and between clusters. The optimal value of \(k\) corresponds to the maximum silhouette value, indicating a better partition of the data points [21].  
The market basket analysis carried out in the 1970s and 1980s is the origination of association rules mining. To find patterns of frequently purchased commodities, researchers first looked at how shoppers behaved in supermarkets. Optimizing product positioning and advertising was intended to increase sales. In 1994, [PERSON] and [PERSON] invented the apriori algorithm, regarded as one of the most important contributions to association rules mining. Using the \"apriori property\", which stipulates that any non-empty subset of a frequent itemset must likewise be frequent, this approach finds frequent itemsets. The apriori technique significantly decreases the computational difficulty of locating frequent itemsets [22].  
Association rule mining (ARM) is widely utilized in a multitude of industries, such as market basket research [8; 23], stock market analysis [24], recommendation systems [7; 19; 22; 25; 26; 27], healthcare [28; 29], and more [30]. This powerful technique plays a pivotal role in aiding organizations in making informed decisions [8; 22; 25; 26], improving customer experience [7; 19], and implementing preventive strategies [28; 29]. Data mining identifies frequent itemsets (groups of items that frequently appear together) and generates explanations for them. The rules are expressed as \"if-then\" statements, where the antecedent is the presence of the items, and the consequent is the element likely to occur with the antecedent. The itemset support refers to the frequency of occurrence of an itemset in a dataset. The itemset percentage represents the percentage of itemsets in a transaction compared to all transactions. The confidence level, indicating the rule's reliability, is determined by the ratio of transactions containing both the antecedent and consequent items to transactions containing only the antecedent [22; 23].