Journal of Artificial Intelligence and Digital Business
Vol. 4 No. 4 (2026): November - January

K-Means Clustering Analysis For Identifying Product Purchase Patterns Based On Country On E-Commerce Platforms

Pramudya, Ryan Arya (Unknown)
Adiguna, Vinsent Brilian (Unknown)



Article Info

Publish Date
03 Nov 2025

Abstract

E-commerce sites get a lot of transaction data from people in different countries who like different kinds of products. It is very important to know how people buy things based on their country and the type of product they buy in order to come up with better and more efficient marketing plans. This study seeks to discern product purchasing patterns by country through the application of the K-Means clustering algorithm on international e-commerce transaction data. This study utilized a dataset comprising 6,000 e-commerce transaction records, characterized by two primary variables: country and product category. Several methods were used in the preprocessing stage. For example, missing values were replaced to deal with missing data, nominal data was changed to numerical data to change categorical data into numerical data, and Z-transformation was used to normalize the data so that it was all on the same scale. We used the K-Means algorithm to group data into clusters with different k values, such as k=2, 5, 10, 15, 20, and 25. We then used the average within centroid distance metric and the elbow method to find the best number of clusters. The elbow method analysis showed that the best number of clusters was k=10, which showed a big drop in the average within centroid distance value. The ten clusters with algorithms K-Means that were made show very specific market segmentation, with each cluster having its own set of countries and product categories that are most popular.

Copyrights © 2026






Journal Info

Abbrev

RIGGS

Publisher

Subject

Computer Science & IT Economics, Econometrics & Finance Electrical & Electronics Engineering Engineering

Description

Journal of Artificial Intelligence and Digital Business (RIGGS) is published by the Department of Digital Business, Universitas Pahlawan Tuanku Tambusai in helping academics, researchers, and practitioners to disseminate their research results. RIGGS is a blind peer-reviewed journal dedicated to ...