Handling Class Imbalance in Routine Customer Classification Using Oversampling Techniques in Grocery Retail
Abstract
Routine customers are crucial for the sustainability of grocery retail services; however, the number of those who make regular repeat purchases is relatively less than those who do not shop regularly. This difference creates class imbalance in the classification of customer data, a condition that can lead models to become skewed and produce less accurate predictions; while overall accuracy is high, with imbalanced data models tend to over-predict the majority class. To overcome class imbalance, various approaches have been developed which are usually divided into two main categories: undersampling and oversampling. This research recommends a customer classification approach by applying oversampling to improve the model’s ability to recognize routine customers; the data used comes from one year of transactions at a grocery store and is organized into behavioral and demographic features at the customer level. Experiments were conducted using Random Oversampling and SMOTE-NC approaches, and applying two easy-to-interpret models, namely Logistic Regression and Decision Tree. The results show that oversampling substantially improves minority-class recall, although this improvement is accompanied by lower precision and does not consistently increase the F1-score.