Shopping pattern segmentation: HAC versus K-Means performance analysis
DOI:
https://doi.org/10.12928/bamme.v5i2.14502Keywords:
consumer analytics, clustering technique, HAC, K-MeansAbstract
Despite widespread use in consumer analytics, clustering techniques remain underutilized for analyzing household basic food commodity consumption patterns, particularly for developing localized retail strategies and targeted food security policies in resource-constrained contexts. This study addresses this practical gap by systematically comparing Hierarchical Agglomerative Clustering (HAC) and K-Means performance on essential consumption patterns across seven commodities: bread, vegetables, fruit, meat, poultry, milk, and wine. Using dual validation metrics, Silhouette Coefficient and Davies-Bouldin Index, we evaluate clustering effectiveness specifically for small-scale household datasets typical of regional food policy environments. HAC demonstrated superior cluster stability (Silhouette score = 0.2936, DBI = 0.8977) compared to K-Means (0.2912, 0.9871), enabling identification of three actionable consumption segments, namely budget-conscious households with economical protein consumption, high spender households with premium patterns across categories, and balanced/selective households preferring bread and wine. These empirically-derived segments provide implementable frameworks for food subsidy targeting, inventory optimization in local retail contexts, and nutrition intervention program design. The findings demonstrate that methodologically rigorous clustering analysis yields policy-relevant household segmentation even with constrained data, offering practical guidance for evidence-based food security interventions where basic commodity consumption directly informs resource allocation decisions.
References
Apriyanto, B., & Sitio, S. L. M. (2025). Penerapan K-Means dalam menganalisis pola pembelian pelanggan pada data transaksi e-commerce. Bit-Tech, 7(3), 790–797. https://doi.org/10.32877/bt.v7i3.2195
Fatrilia, E. I., Safaat, I., Maharani, E., & Rihastuti, S. (2023). Segmentasi konsumen berdasarkan pola pembeli dengan sistem cluster. Seminar Nasional AMIKOM Surakarta (SEMNASA).
FAO. (2006). Food Security Policy Brief, Issue 2. Food and Agriculture Organization.
Hadley, C., & Crooks, D. L. (2012). Coping and the biosocial consequences of food insecurity in the 21st century. American Journal of Physical Anthropology, 149(S55), 72-94
Han, J., Kamber, M., & Pei, J. (2011). Data Mining: Concepts and Techniques, 3rd Edition. The Morgan Kaufmann Series in Data Management Systems.
Hidayati N. (2013). Analisis karakteristik pola belanja keluarga dengan analisis klaster. AdMathEdu, 3(1).
Jihan, A., Prihartono, W., & . F. (2025). Segmentasi konsumen di pasarmu.id menggunakan K-means clustering berdasarkan model RFM. Jurnal Informatika dan Teknik Elektro Terapan, 13(2). https://doi.org/10.23960/jitet.v13i2.6327
Kaushik, M., & Mathur, M. B. (2014). Comparative Study of K-Means and Hierarchical Clustering Techniques. International Journal of Software & Hardware Research in Engineering, 2(6), 93-98.
Kennedy, G., Ballard, T., & Dop, M. C. (2011). Guidelines for measuring household and individual dietary diversity. FAO.
Lebart, L., Morineau, A., & Fénelon, J.-P. (1982). French food data: Average expenditures on food for several different types of families in France [data set]
Likas, A., Vlassis, N., & Verbeek, J. J. (2003). The global K-means clustering algorithm. Pattern Recognition, 36(2), 451-461.
Maulana, R., Adi Putra Pratama, D., Nugraha, N., & Rahmasari, A. (2021). Implementasi algoritma Hierarchical Clustering untuk klasterisasi data pelanggan mall. Gunung Djati Conference Series, 3.
Muhammad, A., Seale Jr, J. L., Meade, B., & Regmi, A. (2011). International evidence on food consumption patterns: An update using 2005 international comparison program data. Technical Bulletin TB-1929. U.S. Department of Agriculture.
Rahma, A. A., Faqih, A., & Rinaldi, A. R. (2025). Optimalisasi strategi pemasaran melalui segmentasi pelanggan dengan analisis RFM dan algoritma K-Means untuk bisnis ritel. JIKO (Jurnal Informatika dan Komputer), 9(2), 338. https://doi.org/10.26798/jiko.v9i2.1737
Ruel, M. T. (2003). Operationalizing dietary diversity: A review of measurement issues and research priorities. The Journal of Nutrition, 133(11), 3911S-3926S.
Safitri, H., Putri Lenggo Geni, S., Merry, F., & Wati, M. (2025). Penerapan K-Means Clustering untuk segmentasi konsumen e-commerce berdasarkan pola pembelian. JUKI : Jurnal Komputer Dan Informatika, 7.
Selim, S. Z., & Ismail, M. A. (1984). K-Means-type algorithms: A generalized convergence theorem and characterization of local optimality. In IEEE Transactions on Pattfrn Analysis and Machine Intelligence (Issue 1).
Smith, L. C., & Subandoro, A. (2007). Measuring food security using household expenditure surveys. International Food Policy Research Institute.
Siagian, R., Pratama, E., Lubis, F., Priscillia, S., & Ramadhani, F. (2025). Segmentasi pelanggan dengan K-Means untuk strategi pemasaran yang efektif. JATI Jurnal Mahasiswa Teknik Informatika, 9.
Sinaga, K. P., & Yang, M. S. (2020). Unsupervised K-means clustering algorithm. IEEE Access, 8, 80716–80727. https://doi.org/10.1109/ACCESS.2020.2988796
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Nur Arina Hidayati

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).

