Classification Analysis of 2 K-Nearest Neighbor (KNN) and Decision Tree Algorithms Using Rapidminer in Breast Cancer

Authors

  • Asri Liya Astuti Universitas Pelita Bangsa

DOI:

https://doi.org/10.59890/ijels.v4i7.44

Keywords:

Breast cancer, K-Nearest Neighbor (KNN), Decision Tree C4.5, ROC Curve, Matrix Confusion

Abstract

Cancer remains the primary cause of mortality in developed nations and ranks second in developing countries. According to 2018 data from the Global Cancer Observatory, Indonesia recorded a cancer incidence rate of 136.2 per 100,000 people, placing it 8th in Southeast Asia and 23rd across Asia. Among women, breast cancer had the highest incidence rate at 42.1 per 100,000, with a mortality rate averaging 17 per 100,000, while cervical cancer followed at 23.4 per 100,000 incidence and 13.9 per 100,000 mortality. Many patients assume that once breast cancer is no longer detectable in the body, it will not return yet recurrence is a real possibility that remains poorly understood by the public. Breast cancer is among the most common cancers affecting Indonesians, especially women, and is generally classified into two forms: benign (non-cancerous) and malignant (cancerous). This study aims to identify an accurate algorithm for analyzing breast cancer datasets, generate insights into patterns or models that support early detection, and compare the performance of two classification algorithms Decision Tree C4.5 and K-Nearest Neighbor (KNN) in classifying breast cancer cases. The research follows the Cross-Industry Standard Process for Data Mining (CRISP-DM) methodology. The central question guiding this study is which of the two algorithms delivers higher classification accuracy and greater utility for identifying patterns relevant to early breast cancer detection. Findings from the CRISP-DM analysis revealed that KNN outperformed the Decision Tree C4.5 model, achieving an accuracy of 97.14% and an AUC score of 0.976, indicating excellent classification performance (AUC values between 0.90 and 1.00 are considered very good).

References

Madyaningrum and Sulastri, "Analysis of Breast Cancer Recurrence Prediction Using K-Nearest Neighbor," ProceedingSINTAK 2019, pp. 180–185, 2019.

Fahrurrozi and Wasilah, "Early Detection of Breast Cancer Using K-Nearest Neighbor (KNN) and Decision Tree C-45 Algorithms," Teknika, vol. 17, no. 2, pp. 427–434, 2023, [Online]. Available: https://jurnal.polsri.ac.id/index.php/teknika/article/view/7565

Farahdiba, D. Yusuf, and S. Nugroho, "Classification of Breast Cancer Using the Gain Ratio Algorithm."

Angkasa and J. J. Pangaribuan, "Information System Development Compares the Accuracy Level of Random Forest and Knn to Diagnose Breast Cancer," J. Inf. Syst. Dev., vol. 7, no. 1, pp. 37–38, 2022, [Online]. Available: http://dx.doi.org/10.19166/xxxx

Mohammed, S. Darrab, S. A. Noaman, and G. Saake, "Analysis of breast cancer detection using different machine learning techniques," in Communications in Computer and Information Science, Springer, 2020, pp. 108–117. doi: 10.1007/978-981-15-7205-0_ 10.

Findawati, I. R. I. Astutik, A. S. Fitroni, I. Indrawati, and N. Yuniasih, "Comparative analysis of Naïve Bayes, K Nearest Neighbor and C.45 method in weather forecast," J. Phys. Conf. Ser., vol. 1402, no. 6, 2019, doi: 10. 1088/1742-6596/1402/6/066046.

Derisma and F. Febrian, "Comparison of Neural Network Classification Techniques, Support Vector Machine, and Naive Bayes in Detecting Breast Cancer," Bina Insa. Ict J., vol. 7, no. 1, p. 53, 2020, doi: 10.51211/biict.v7i1.1343.

Abdul Jabbar, E. Hasmin, C. Susanto, W. Musu, and I. Article, "Comparison of Decision Tree Algorithms, Naive Bayes, and K-Nearest Neighbors in Breast Cancer Classification," October, vol. 14, no. 3, pp. 258–270, 2022, [Online]. Available: https://www.doi.org/10.22303/csrid.14.3.2022.258-270

Hidayati, F. S. Rahmat Suwandi, D. Ediana, and F. Nursing and Public Health, Universitas Prima Nusantara Bukittinggi, West Sumatra, "The Experience of Patients Diagnosed with Lung Cancer for the First Time Reviewed from the Theory of the Five Stages of Grieving Article Information a B S T R a K," vol. 14, pp. 70–073, 2023, [Online]. Available: http://ejurnal.stikesprimanusantara.ac.id/

R. Wulandari, W. Wijayanti, E. Hapsari, D. Widyastutik, and S. Putri H, "Efforts to Improve Cadre Skills in Early Detection of Breast Cancer with Self-Breast Examination (SADARI) at Posyandu Tanggul Asri RW 10 Kadipiro Village, Banjarsari District, Surakarta," J. Healthy greetings Masy., vol. 3, no. 2, pp. 47–52, 2022, doi: 10.22437/jssm.v3i2.18171.

Aini Silvi Astuti, Yunia Renny Andhikatias, "The Effectiveness of Conscious Health Education on the Level of Knowledge of Adolescent Girls About Early Detection of Breast Cancer in Tegalsari Dam," Angew. Chemistry Int. Ed. 6(11), 951–952., vol. 2, 2019.

Destria, "Decision Support System for Companies that Excel in the Industrial Sector with the Weighted Product Method," J. Ris. Sist. Inf. and Technology. Inf., vol. 3, no. 2, pp. 1–11, 2021, doi: 10.52005/jursistekni.v3i2.88.

Nawangsih, I. Melani, S. Fauziah, and A. I. Article, "Pelita Technology Predicts Employee Appointment Using the C5.0 Algorithm Method (Case Study of Pt. Mataram Cakra Buana Agung," J. Pelita Teknol., vol. 16, no. 2, pp. 24–33, 2021.

Kirsten, Prediction (of metaphor). 2021.

Polo and H. A. Miot, "Applications of the ROC curve in clinical and experimental studies," J. Vasc. Arms., vol. 19, pp. 13–16, 2020, doi: 10. 1590/1677-5449.200186.

Erwansyah, "Implementation of Data Mining to Analyze the Relationship of Chemical Product Sales Data to Inventory of Goods Using FP (Frequent Pattern) Growth Algorithm at PT . Grand Multi Chemicals," J. Teknol. Sist. Inf. and Sist. Computer. TGD (J-SISKO TECH), VOL. 2, no. 2, pp. 30–40, 2019.

Fig. 1 and P. S. Hasugian2, "DATA MINING OF OFFICE INVENTORY ORDER LEVELS USING A PRIORI ALGORITHM IN THE NORTH SUMATRA REGIONAL POLICE," 2019.

Setiyani, M. Wahidin, D. Awaludin, and S. Purwani, "Analysis of Predicted Student Graduation on Time Using the Naïve Bayes Data Mining Method: Systematic Review," Fakt. Exacta, vol. 13, no. 1, p. 35, 2020, doi: 10.30998/faktorexacta.v13i1.5548

Nasrullah, "Implementation of Decision Tree Algorithm for Best-Selling Product Classification," J. Ilm. Computer Science., vol. 7, no. 2, pp. 45–51, 2021, doi: 10.35329/jiik.v7i2.203.

Fadrial, "Naive Bayes Algorithm for Finding Student Estimated Time Students," J. Inf. Technol. Comput. Sci., vol. 4, no. 1, pp. 20–29, 2021.

Hermanto and A. Jaelani, "APPLICATION OF DATA MINING FOR PREDICTION OF NON-CASH FOOD ASSISTANCE RECIPIENTS (BPNT) IN WANACALA VILLAGE USING THE BAYES METHOD."

P. Putra, A. M. H. Pardede, and S. Syahputra, "Analysis of K-Nearest Neighbour (Knn) Method in Classification of Iris Bunga Data," J. Tek. Inform. Kaputama, vol. 6, no. 1, pp. 297–305, 2022, [Online]. Available: https://garuda.kemdikbud.go.id/documents/detail/2458300

Mustakim, R. Hastarimasuci, P. Papilo, Zarkasih, Olive, and A. Nazir, "Variable Selection to Determine Majors of Students using K-Nearest Neighbor and Naïve Bayes Classifier Algorithm," J. Phys. Conf. Ser., vol. 1363, no. 1, 2019, doi: 10. 1088/1742-6596/1363/1/012057.

M. Reza Noviansyah, T. Rismawan, D. Marisa Midyanti, J. Computer Systems, and F. H. MIPA Tanjungpura University Jl Hadari Nawawi, "The Application of Data Mining Using the K-Nearest Neighbor Method for the Classification of Fire Weather Index Based on AWS (Automatic Weather Station) Data (Case Study: Kubu Raya Regency)," J. Coding, Sist. Computer. Untan, vol. 06, no. 2, pp. 48–56, 2018.

D. Setiawati, I. Taufik, J. Friday, and W. B. Zulfikar, "Classification of Quranic Verses Translation of Science Using Mobile-Based Decision Tree Algorithm," J. Online Inform., vol. 1, no. 1, p. 24, 2016, doi: 10.15575/join.v1i1.7.

K. P. Decision, "Decision Tree 3 Reference," vol. 11, no. November, pp. 243–257, 2020.

R. Rustam, S. Rahmatullah, S. Supriyato, and S. Wahyuni, "The Application of Data Mining for the Prediction of Plywood Product Sales at Pt Puncak Menara Hijau Mas," J. Inf. and Compost., vol. 8, no. 2, pp. 75–86, 2020, doi: 10.35959/jik.v8i2.186.

B. G. Sudarsono, M. I. Leo, A. Santoso, and F. Hendrawan, "Analysis of Netflix Data Mining Using the Rapid Miner Application," JBASE - J. Bus. Audit Inf. Syst., vol. 4, no. 1, pp. 13–21, 2021, doi: 10.30813/jbase.v4i1.2729.

S. James and C. Alley, "Working Paper Series by," vol. 55, no. 97, pp. 1023– 1038, 2007.

S. Haryati, A. Sudarsono, and E. Suryana, "The Implementation of Data Mining to Predict the Study Period of Students Using the C4.5 Algorithm (Case Study: Dehasen University Bengkulu)," J. Media Infotama, vol. 11, no. 2, pp. 130–138, 2015.

Downloads

Published

2026-07-18

Issue

Section

Articles