Faktor Exacta
Vol 18, No 2 (2025)

Penerapan Algoritma K-Nearest Neighbors (KNN) dalam Menentukan Jenis KB Menggunakan Google Colab

Hadi, Abdul (Univeristas Budi Luhur)
Ryansyah, Decky (Universitas Budi Luhur)
Brotosaputro, Goenawan Radzi (Unknown)



Article Info

Publish Date
11 Oct 2025

Abstract

This study aims to apply the K-Nearest Neighbors (KNN) algorithm to determine the appropriate contraceptive method (KB) based on demographic data and user characteristics. The main problem faced is the lack of an effective decision support system to assist potential KB users in selecting the most suitable contraceptive method according to individual conditions. Additionally, the selection of contraceptive methods is often done manually by healthcare professionals without the support of predictive technology that could enhance recommendation accuracy. This research was conducted using Google Collab as a data processing platform, utilizing Python libraries such as Pandas, NumPy, and Scikit-learn. The dataset used includes information about KB users, including age, number of children, health history, and personal preferences. The data was pre processed to handle missing values and normalized to suit the analysis. The KNN model was tested with variations of the k value to find the optimal parameter that yields the highest accuracy. The results showed that the KNN algorithm was able to recommend contraceptive methods with an accuracy of 76% at k = 5. The main finding of this study is that the KNN model can be used as a decision support tool to determine the most appropriate contraceptive method for individuals. This research is expected to support efforts to improve reproductive health services through the utilization of machine learning technology.

Copyrights © 2025






Journal Info

Abbrev

Faktor_Exacta

Publisher

Subject

Civil Engineering, Building, Construction & Architecture Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering Industrial & Manufacturing Engineering

Description

Faktor Exacta is a peer review journal in the field of informatics. This journal was published in March (March, June, September, December) by Institute for Research and Community Service, University of Indraprasta PGRI, Indonesia. All newspapers will be read blind. Accepted papers will be available ...