Comparison Of Lung Cancer Classification Using Decision Tree And Random Forest: Perbandingan Klasifikasi Penyakit Kanker Paru-Paru Menggunakan Decision Tree Dan Random Forest - Adawiyah, Rabiatul; Cahya Julia Kartikasari, Dwi (Computer Engineering Departement, Universitas Komputer Indonesia, 2025)
Lung cancer is the leading cause of cancer-related deaths across various age groups, with risk factors such as smoking, air pollution, and chronic diseases. Lung cancer is characterized by the uncontrolled growth of cells in lung tissue, which can spread to other organs through metastasis. Machine learning-based classification can assist in the early detection of this disease. This study compares the Decision Tree and Random Forest methods in classifying lung cancer using a dataset containing seven attributes and 1,010 data entries. Missing values were handled using mode imputation. Feature importance analysis with Random Forest identified Coughing, Chronic Disease, Smoking, and Shortness of Breath as the most influential features in classification. The classification results showed that Decision Tree without feature selection achieved an accuracy of 64.85%, higher than Random Forest, which reached only 52.62%. After feature selection, Decision Tree accuracy decreased to 55.94%, while Random Forest experienced a slight decline to 52.47%. These findings indicate that Decision Tree is more effective in capturing data patterns without feature selection, whereas Random Forest tends to be less optimal with relatively small datasets. Keywords – Machine Learning; Classification; Feature Importance; Entropy; Gain.