Comparing Different KNN Parameters Based on Woman Risk Factors to Predict the Cervical Cancer - Saletia, Maria Claudia; Anshori, Mochammad; Haris, M Syauqi (Politeknik Negeri Batam, 2025)
Cervical cancer remains a major cause of mortality among women, particularly in low-resource regions where access to conventional screening is limited. Early detection through predictive modeling offers a low-cost and non-invasive alternative to clinical diagnostics. This study aims to evaluate the effectiveness of the k-Nearest Neighbors algorithm for predicting cervical cancer risk using behavioral and psychosocial attributes. The research utilized the publicly available Sobar cervical cancer behavioral dataset comprising 72 instances with 18 input features and a binary target label. Data preprocessing included removal of incomplete records, encoding of categorical variables, and normalization. The algorithm was tested across varying numbers of neighbors and distance metrics, with performance evaluated using 10-fold cross-validation and multiple classification metrics. The optimal configuration was achieved with three neighbors and the Manhattan distance metric, yielding an accuracy of 93.06%, sensitivity of 93.10%, specificity of 85.90%, precision of 93.10%, F1-score of 92.90%, and an area under the curve of 0.8952. This performance surpassed the reported baseline of a probabilistic classifier and demonstrated the algorithm’s capability to capture complex behavioral patterns associated with cervical cancer risk. These findings confirm the feasibility of applying optimized instance-based learning to behavioral data for early cancer risk assessment. The approach offers potential for integration into community health programs to support early detection and prevention strategies.