The Family Planning (KB) program aims to control population growth, yet the high discontinuation rate due to mismatched contraceptive choices remains a major challenge in the field. Therefore, this study aims to develop an objective contraceptive prediction model using the Random Forest algorithm to minimize the risk of program failure. The methodology involved processing 4,500 acceptor records balanced into 9 contraceptive classes with 12 demographic variables, optimized via GridSearchCV, and evaluated using 5-Fold Cross Validation. The results indicate that the model operates stably with an average accuracy of 78.87%, achieving the best performance in the Fold-1 test at 81.67%. The model also demonstrated optimal recognition for the MOP and MAL classes (F1-Score 0.98), proving the algorithm's reliability in identifying classes with highly distinctive characteristics despite data overlap challenges within the Injectable and Pill classes. Feature Importance analysis reveals that Age (22.60%), Gender (14.39%), and Age at Marriage (12.44%) are the most dominant determining factors. This prediction model is implemented in a Flask application, serving as a practical decision-support tool for healthcare workers to provide instant, transparent, and targeted contraceptive recommendations.
Copyrights © 2026