Perbandingan Metode K-Nearest Neighbors (K-NN) dan Regresi Logistik Biner Dalam Memprediksi Kanker - Surbakti, Christina Amanda; Sinaga, Albert Samuel; Simorangkir, Agnes Monica; Sarah, Auta Shinta; Harefa, Clara Jocelyn; Dalimunthe, Syairal Fahmy (Penerbit Yayasan Daarul Huda Kruengmane, 2025)
Background: Cancer is one of the diseases with a high mortality rate, so an accurate classification method is needed to support the diagnosis process. This study compares the performance of the K-Nearest Neighbors (KNN) method and Binary Logistic Regression in classifying cancer as malignant or benign. Methods: This study used a secondary dataset from Kaggle consisting of 569 cancer patient data with 11 independent variables covering tumor characteristics. The model was developed using data normalization, training and testing data division, and the K-Fold Cross Validation technique to optimize the K parameter in KNN. Model evaluation was carried out based on accuracy, precision, recall, and the McNemar and ANOVA tests to test the significance of differences in model performance. Results: The KNN model with K=13 showed an accuracy of 95.58%, a precision of 95.83%, and a recall of 97.18%, while Binary Logistic Regression had an accuracy of 94.69%, a precision of 92.86%, and a recall of 92.86%. The McNemar test results showed that there was no significant difference between the two models (p-value = 1), while the ANOVA results showed that all independent variables contributed to the model. Conclusion: Both methods performed well in cancer classification, but KNN with K=13 had a slight advantage in accuracy and recall compared to Binary Logistic Regression. The implementation of this model can support decision support systems in cancer diagnosis to improve the accuracy of classification results.