Journal of Digital Technology and Computer Science
Vol. 3 No. 2 (2026): April 2026

Implementation of K-Means Algorithm in Data Mining for Drug Market Segmentation

Joko Prasetiana (Unknown)
Feby Charlos (Unknown)



Article Info

Publish Date
23 Apr 2026

Abstract

Purpose – This study aims to implement the K-Means clustering algorithm in data mining to segment pharmaceutical products based on stock and sales patterns. The study addresses the need for data-driven product classification to support more effective inventory management and marketing decision-making in pharmaceutical businesses. Methods – This research applied a quantitative data mining approach using secondary sales transaction data from a pharmaceutical distributor covering the period from January 2022 to December 2023. The dataset consisted of 1,248 transaction records, which were aggregated into 12 pharmaceutical products based on stock quantity and sold quantity variables. Data preprocessing included cleaning, transformation, aggregation, and scale checking through Min-Max normalization. The reported K-Means calculation was presented using original-scale stock and sold quantity values for interpretability, while the optimal number of clusters was determined using the Elbow Method and validated with the Silhouette Score. Findings – The Elbow Method indicated that three clusters were optimal, supported by a Silhouette Score of 0.71. The clustering results classified products into high-demand, moderate-demand, and low-demand segments. High-demand products require prioritized stock replenishment and distribution, while low-demand products need tighter inventory control and targeted promotional strategies. Research implications – The findings provide practical insights for improving procurement planning, inventory optimization, and promotional decision-making. However, the analysis is limited to 12 aggregated products and two variables. Originality – This study contributes by applying K-Means clustering specifically to pharmaceutical product-level market segmentation using stock and sales data.

Copyrights © 2026






Journal Info

Abbrev

DTCS

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management Electrical & Electronics Engineering Engineering

Description

Digital Technology and Socio-Technical Innovation, including the design, development, implementation, and evaluation of digital solutions, platforms, applications, and infrastructures that support modern socio-technical systems, digital transformation, and technology-enabled services. Computer ...