Comparative Analysis of Machine Learning Algorithms for Lung Cancer Classification: A Progressive Evaluation from Preprocessing to Hyperparameter Tuning - Laurentius Joandanu; Usman Sudibyo (Politeknik Negeri Batam, 2026)
Lung cancer is one of the leading causes of cancer-related deaths worldwide, with the main challenge being the difficulty of diagnosis at an early stage. Machine learning-based approaches have been proven to provide efficient solutions in supporting the classification process of this disease. This study proposes a comparative study of five machine learning algorithms, namely K-Nearest Neighbors (KNN), Logistic Regression, Random Forest, CatBoost and LightBGM, for lung cancer classification using the survey_lung_cancer.csv dataset consisting of 309 instances and 16 clinical features. All models were trained using a comprehensive preprocessing pipeline including duplicate data removal, missing values handling, outlier handling using the Interquartile Range (IQR) method, and categorical feature encoding using One-Hot Encoding. Hyperparameter optimization was performed uniformly using RandomizedSearchCV with Stratified K-Fold (k=10) and 50 iterations to ensure a fair comparison between algorithms. Each algorithm was evaluated under three progressive modelling conditions: baseline, after preprocessing, and after hyperparameter tuning, to quantify the individual contribution of each stage to model performance. The results show that Random Forest consistently recorded the best performance across all modelling conditions with an accuracy of 0.9464 and F1-Score of 0.9684 after applying preprocessing and hyperparameter tuning, demonstrating the effectiveness of the proposed progressive preprocessing and hyperparameter tuning pipeline. Learning curve analysis proves that none of the models experienced significant overfitting on the dataset used, indicating stable performance that has yet to be validated on independent clinical data.