Unveiling Patterns in the Night Market: A Machine Learning Approach to Customer Segmentation and Market Basket Analysis

Authors:

Abstract
This paper delves into consumer behavior and business strategy through a comprehensive study of the Night Market. The primary objective is to cluster the customers into their respective groups, to discover intricate buying patterns and associations among products purchased, shedding light on the preferences and tendencies of the customer demographic. The data was collected from the Mae Fah Luang University’s night market. With a focus on the dynamic interactions between the shoppers and the diverse array of offerings within the market, the research employed Machine Learning techniques in business analytics such as Customer Segmentation and Market Basket Analysis. The research applied K-means Clustering for Customer Segmentation and successfully segmented customers into five distinct groups, determined using the Elbow Method and clustering validation metrics. Meanwhile, four association rules were established between products based on their Support, Confidence, and Lift by applying the Apriori algorithm for Market Basket Analysis. After generating the association rules, the next approach was to apply these rules to a new group of customers which consists of 20 people for predictive purposes. By analyzing the results, it can be summarized that the rules are well accepted with the second rule which refers to the association between “Street food and snacks” and “Beverages” being the strongest exhibited rule with correctly predicting 10 out of 20 customers among the four rules in Association Rule Mining.