ANALISIS PENGELOMPOKAN PENJUALAN OBAT MENGGUNAKAN ALGORITMA K-MEANS UNTUK OPTIMALISASI STOK OBAT PADA APOTEK OLE
Keywords:
data mining; K-Means clustering; penjualan obat; manajemen persediaan; apotekAbstract
Pengelolaan persediaan obat merupakan salah satu aspek penting dalam operasional apotek karena berpengaruh langsung terhadap ketersediaan layanan dan efisiensi biaya. Permasalahan yang sering terjadi adalah penumpukan stok obat yang kurang laku serta kekosongan obat yang memiliki tingkat permintaan tinggi. Penelitian ini bertujuan untuk menerapkan algoritma K-Means Clustering dalam mengelompokkan data penjualan obat di Apotek OLE guna mendukung optimalisasi pengelolaan stok obat.Metode yang digunakan dalam penelitian ini adalah data mining dengan pendekatan Knowledge Discovery in Database (KDD) yang meliputi tahapan seleksi data, preprocessing, transformasi data, proses clusteringustering menggunakan algoritma K-Means, serta evaluasi hasil clustering. Data yang digunakan merupakan data penjualan obat Apotek OLE dengan variabel stok obat, harga jual, dan jumlah obat terjual. Penentuan jumlah cluster optimal dilakukan menggunakan Davies–Bouldin Index (DBI).Hasil penelitian menunjukkan bahwa jumlah cluster optimal adalah dua cluster (K = 2) dengan nilai DBI sebesar 0,101. Cluster pertama merepresentasikan kelompok obat dengan tingkat penjualan rendah, sedangkan cluster kedua merepresentasikan kelompok obat dengan tingkat penjualan sedang. Pengelompokan ini mampu memberikan gambaran yang jelas mengenai pola penjualan obat dan tingkat perputaran stok di apotek.Kesimpulan dari penelitian ini adalah bahwa algoritma K-Means Clustering dapat digunakan secara efektif untuk mengelompokkan penjualan obat dan membantu pihak apotek dalam pengambilan keputusan terkait pengadaan dan pengelolaan stok obat. Dengan memanfaatkan hasil clustering, apotek dapat meminimalkan risiko penumpukan stok dan kekurangan obat, sehingga pengelolaan persediaan menjadi lebih optimal.
References
Abdullah, A. N., Kamarudin, K., Kamarudin, L. M., Adom, A. H., Mamduh, S. M., Juffry, Z. H. M., & Hernandez Bennetts, V. (2022). Correction model for metal oxide sensor drift caused by ambient temperature and humidity. Sensors, 22(9), 3301. https://doi.org/10.3390/s22093301
Ali, S., Alam, F., Arif, K. M., & Potgieter, J. (2023). Low-cost CO sensor calibration using one-dimensional convolutional neural network. Sensors, 23(2), 854. https://doi.org/10.3390/s23020854
Almalki, S. S. (2025). AI-Driven decision support systems in agile software project management: Enhancing risk mitigation and resource allocation. Systems, 13(3), 208. https://doi.org/10.3390/systems13030208
Alotaibi, B. (2023). A survey on Industrial Internet of Things security: Requirements, attacks, AI-based solutions, and edge computing opportunities. Sensors, 23(17), 7470. https://doi.org/10.3390/s23177470
Andrews, B., Chakrabarti, A., Dauphin, M., & Speck, A. (2023). Application of machine learning for calibrating gas sensors for methane emissions monitoring. Sensors, 23(24), 9898. https://doi.org/10.3390/s23249898
Balagopal, G. (2025). Calibration of Low-Cost LoRaWAN-Based IoT Air Quality Monitors Using Machine Learning in a Smart City Context. Sensors, 25(5), 1614. https://doi.org/10.3390/s25051614
Beck, K., Grenning, J., Martin, R. C., & Fowler, M. (2021). Agile manifesto and software engineering principles. IEEE Software, 38(4), 23–30. https://doi.org/10.1109/MS.2021.3085897
Chan, R., Yan, W. K., Ma, J. M., Loh, K. M., Yu, T., Low, M. Y. H., Yar, K. P., Rehman, H., & Phua, T. C. (2023). IoT devices deployment challenges and studies in building management system. Frontiers in Internet of Things, 2, 1254160. https://doi.org/10.3389/friot.2023.1254160
Chew, B.-K., Mahmud, A., & Singh, H. (2025). Autonomous Hazardous Gas Detection Systems: A Systematic Review. Sensors, 25(21), 6618. https://doi.org/10.3390/s25216618
Chew, B. K., & al., et. (2025). Autonomous hazardous gas detection systems: A systematic review of sensor calibration, analytics and drift-compensation. Sensors, 25(21), 6618. https://doi.org/10.3390/s25086618
Dauda, A., Flauzac, O., & Nolot, F. (2024). A Survey on IoT Application Architectures. Sensors, 24(16), 5320. https://doi.org/10.3390/s24165320
de Rossi, A. M., & Li, L. (2023). A structured review of IoT-based embedded systems and machine learning for water quality monitoring. Applied Sciences, 15(21), 11719. https://doi.org/10.3390/app152111719
Dorst, T., Schneider, T., Eichstädt, S., & Schütze, A. (2023). Influence of measurement uncertainty on machine learning results demonstrated for a smart gas sensor. Journal of Sensors and Sensor Systems, 12, 45–60. https://doi.org/10.5194/jsss-12-45-2023
Dubey, R., Telles, A., Nikkel, J., Cao, C., Gewirtzman, J., Raymond, P. A., & Lee, X. (2024). Low-cost CO₂ NDIR sensors: Performance evaluation and calibration using machine learning techniques. Sensors, 24(17), 5675. https://doi.org/10.3390/s24175675
El Barkani, M., Benamar, N., Talei, H., & Bagaa, M. (2024). Gas leakage detection using Tiny Machine Learning. Electronics, 13(23), 4768. https://doi.org/10.3390/electronics13234768
Fu, L., You, S., Li, G., & Fan, Z. (2023). Application of Semiconductor Metal Oxide in Chemiresistive Methane Gas Sensor: Recent Developments and Future Perspectives. Molecules, 28(18), 6710. https://doi.org/10.3390/molecules28186710
Furuta, D., Sayahi, T., Li, J., Wilson, B., Presto, A. A., & Li, J. (2022). Characterization of inexpensive metal oxide sensor performance for trace methane detection. Atmospheric Measurement Techniques, 15(17), 5117–5128. https://doi.org/10.5194/amt-15-5117-2022
Ghamari, M., & al., et. (2022). Evaluation and calibration of low-cost off-the-shelf particulate matter sensors using machine learning techniques. Wiley Wireless & Sensor Networks, 12(3), 12043. https://doi.org/10.1049/wss2.12043
Guerrero-Ulloa, G., Rodríguez-Domínguez, C., & Hornos, M. J. (2023). Agile methodologies applied to the development of Internet of Things (IoT)-based systems: A review. Sensors, 23(2), 790. https://doi.org/10.3390/s23020790
Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679–688. https://doi.org/10.1016/j.ijforecast.2006.03.001
Imani, T., & Nakano, M. (2022). A study of IoT project management methodology with agile development. Journal of Information & Management, 38(3), 120–127. https://doi.org/10.20627/jsim.38.3_120
Jena, B., Kumar Pradhan, S., Jha, R., Goel, S., & Sharma, R. (2023). LPG gas leakage detection system using IoT. Materials Today: Proceedings, 74, 795–800. https://doi.org/10.1016/j.matpr.2022.11.172
Jiang, Z. (2025). Gas Leak Detection and Leakage Rate Identification in Underground Utility Tunnels via CRNN and IoT. Applied Sciences, 15(14), 8022. https://doi.org/10.3390/app15148022
Koziel, S., Pietrenko-Dąbrowska, A., Wojcikowski, M., & Pankiewicz, B. (2024). Efficient Calibration of Cost-Efficient Particulate Matter Sensors Using Machine Learning and Time-Series Alignment. Knowledge-Based Systems, 295, 111879. https://doi.org/10.1016/j.knosys.2024.111879
Lalithadevi, B., & Krishnaveni, S. (2025). ExAIRFC-GSDC: An Advanced Machine-Learning-Based Interpretable Framework for Accurate Gas Leakage Detection and Classification. International Journal of Computational Intelligence Systems, 18, 16. https://doi.org/10.1007/s44196-025-00742-6
Landi, E., Parri, L., Baldo, D., Parrino, S., Vatansever, T., Fort, A., Mugnaini, M., & Vignoli, V. (2025). Reliability and Performance Evaluation of IoT-Based Gas Leakage Detection Systems for Residential Environments. Electronics, 14(19), 3798. https://doi.org/10.3390/electronics14193798
Lee, H., & Park, J. (2024). Enhancing IoT-based environmental monitoring and power forecasting: a comparative analysis of AI models for real-time applications. Applied Sciences, 14(24), 11970. https://doi.org/10.3390/app142411970
Lee, J. H., Kim, Y., Kim, I., Hong, S. B., & Yun, H. S. (2024). Comparative analysis of ultrasonic and traditional gas-leak detection systems in the process industries: A Monte Carlo approach. Processes, 12(1), 67. https://doi.org/10.3390/pr12010067
Lee, W.-T., & Chen, C.-H. (2023). Agile software development and reuse approach with Scrum and software product line engineering. Electronics, 12(15), 3291. https://doi.org/10.3390/electronics12153291
Li, Z., Zeng, W., & Li, Q. (2022). SnO₂ as a Gas Sensor in Detection of Volatile Organic Compounds: A Review. Sensors & Actuators A: Physical, 349, 113845. https://doi.org/10.1016/j.sna.2022.113845
Liang, H. (2021). Risk Assessment of Liquefied Petroleum Gas Explosion in a Closed Pipeline. ACS Omega. https://doi.org/10.1021/acsomega.1c03430
Liang, L., & Daniels, J. (2022). What influences low-cost sensor data calibration? A systematic assessment of algorithms, duration, and predictor selection. Aerosol and Air Quality Research, 22, 220076. https://doi.org/10.4209/aaqr.22-02-oa-0076
Liang, L., Gong, P., Cong, N., Li, Z., Zhao, Y., & Chen, Y. (2022). What influences low-cost sensor data calibration? A systematic assessment. Aerosol and Air Quality Research, 22(4). https://doi.org/10.4209/aaqr.220076
Manowska, A., Wycisk, A., Nowrot, A., & Pielot, J. (2023). The Use of the MQTT Protocol in Measurement, Monitoring and Control Systems as Part of the Implementation of Energy Management Systems. Electronics, 12(1), 17. https://doi.org/10.3390/electronics12010017
Mitchell, H. L., Cox, S. J., & Lewis, H. G. (2024). Calibration of a low-cost methane sensor using machine learning. Sensors, 24(4), 1066. https://doi.org/10.3390/s24041066
Mustafa, F. E., Ahmed, I., Basit, A., Alvi, U. E.-H., Malik, S. H., Mahmood, A., & Ali, P. R. (2023). A Review on Effective Alarm Management Systems for Industrial Process Control: Barriers and Opportunities. International Journal of Critical Infrastructure Protection, 41, 100599. https://doi.org/10.1016/j.ijcip.2023.100599
Nguyen, T. T., Pham, H. D., & Kim, S. (2024). Edge Computing-Based Gas Detection System Using Low-Cost Sensors and IoT Integration. IEEE Access, 12, 7715–7730.
Oh, K., Kang, H. M., Leem, D., Lee, H., Seo, K. Y., Yoon, S., & Kim, H. (2021). Early detection of diabetic retinopathy based on deep learning and ultra-wide-field fundus images. Scientific Reports, 11(1), 1897. https://doi.org/10.1038/s41598-021-81539-3
Orfanos, V. A., Kaminaris, S. D., Papageorgas, P., Piromalis, D., & Kandris, D. (2023). A comprehensive review of IoT networking technologies for smart home automation applications. Journal of Sensor & Actuator Networks, 12(2), 30. https://doi.org/10.3390/jsan12020030
Ouyang, R., Wang, J., Xu, H., Chen, S., Xiong, X., Tolba, A., & Zhang, X. (2023). A Microservice and Serverless Architecture for Secure IoT System. Sensors, 23(10), 4868. https://doi.org/10.3390/s23104868
Papaconstantinou, R., Demosthenous, M., Bezantakos, S., Hadjigeorgiou, N., Costi, M., Stylianou, M., Symeou, E., Savvides, C., & Biskos, G. (2023). Field evaluation of low-cost electrochemical air quality gas sensors under extreme temperature and relative humidity conditions. Atmospheric Measurement Techniques, 16(12), 3313–3329. https://doi.org/10.5194/amt-16-3313-2023
Popescu, S. M., Mansoor, S., Wani, O. A., Kumar, S. S., Sharma, V., Sharma, A., Arya, V. M., Kirkham, M. B., Hou, D., Bolan, N., & Chung, Y. S. (2024). Artificial intelligence and IoT driven technologies for environmental pollution monitoring and management. Frontiers in Environmental Science, 12, 1336088. https://doi.org/10.3389/fenvs.2024.1336088
Quintana, M. A., Palacio, R. R., Soto, G. B., & González-López, S. (2022). Agile development methodologies and natural language processing: A mapping review. Computers, 11(12), 179. https://doi.org/10.3390/computers11120179
Santos, L., Costa, T., Caldeira, J. M. L. P., & Soares, V. N. G. J. (2022). Performance Assessment of ESP8266 Wireless Mesh Networks. Information, 13(5), 210. https://doi.org/10.3390/info13050210
Schmitz, S., Towers, S., Villena, G., Caseiro, A., Wegener, R., Klemp, D., Langer, I., Meier, F., & von Schneidemesser, E. (2021). Unravelling a black box: an open-source methodology for the field calibration of small air quality sensors. Atmospheric Measurement Techniques, 14(11), 7221–7240. https://doi.org/10.5194/amt-14-7221-2021
Sharma, P., Kaur, H., & Singh, A. (2023). Smart Gas Monitoring Systems Using Machine Learning and IoT: Design and Performance Evaluation. IEEE Sensors Journal, 23(15), 16621–16630.
Smith, A., & Jones, B. (2025). Advancements in air quality monitoring: a systematic review of IoT-based air quality monitoring and AI technologies. Artificial Intelligence Review, 58, 275. https://doi.org/10.1007/s10462-025-11277-9
Taştan, M. (2025). Machine learning–based calibration and performance evaluation of low-cost Internet of Things air quality sensors. Sensors, 25(10), 3183. https://doi.org/10.3390/s25103183
Tsoukas, V., Gkogkidis, A., Boumpa, E., Papafotikas, S., & Kakarountas, A. (2023). A gas leakage detection device based on the technology of TinyML. Technologies, 11(2), 45. https://doi.org/10.3390/technologies11020045
Vardakis, G., Hatzivasilis, G., Koutsaki, E., & Papadakis, N. (2024). Review of smart-home security using the Internet of Things. Electronics, 13(16), 3343. https://doi.org/10.3390/electronics13163343
Yadav, R., Kumar, R., & Pandey, R. (2021). Design and Implementation of an IoT-Based Real-Time Gas Leakage Detection and Monitoring System. IEEE Internet of Things Journal, 8(12), 9642–9652.
Yasin, A., Delaney, J., Cheng, C.-T., & Pang, T. Y. (2022). The design and implementation of an IoT sensor-based indoor air quality monitoring system using off-the-shelf devices. Applied Sciences, 12(19), 9450. https://doi.org/10.3390/app12199450
Yu, Y. (2025). A review of machine learning-assisted gas sensor calibration. Biosensors, 15(8), 548. https://doi.org/10.3390/bios15080548
Zeng, F., Pang, C., & Tang, H. (2024). Sensors on Internet of Things Systems for the Sustainable Development of Smart Cities: A Systematic Literature Review. Sensors, 24(7), 2074. https://doi.org/10.3390/s24072074
Zhou, Q., Liu, X., & Zhang, Y. (2022). A Review on Sensor Technologies for Gas Leakage Detection in Smart Environments. Sensors and Actuators A: Physical, 341, 113579.
Downloads
Published
Issue
Section
Citation Check
License
Copyright (c) 2025 Meifriska Aisyah, Willy Prihartono, Indra Wiguna Marthanu, Kaslani Kaslani, Aris Pratama Putra

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.




