0% found this document useful (0 votes)
14 views4 pages

Lung Cancer Risk Prediction Using ML

The research presents a machine learning system for predicting lung cancer risk using an ensemble approach that combines various classifiers, achieving an accuracy of 95.69%. The study utilizes SHAP explainability to enhance interpretability and trust in predictions, addressing the challenges of early diagnosis and class imbalance in patient data. Future work aims to validate the model with real hospital data to further improve its clinical applicability.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Lung Cancer Risk Prediction Using ML

The research presents a machine learning system for predicting lung cancer risk using an ensemble approach that combines various classifiers, achieving an accuracy of 95.69%. The study utilizes SHAP explainability to enhance interpretability and trust in predictions, addressing the challenges of early diagnosis and class imbalance in patient data. Future work aims to validate the model with real hospital data to further improve its clinical applicability.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

2025 International Conference on Signal Processing, Computation, Electronics, Power and Telecommunication (iConSCEPT)

Ensemble-Based Lung Cancer Risk Prediction with SHAP Explainability


Parinitha Varshini S¹, Perarivazhagan R¹, Dharshini N², Siva Vishnu C¹

Department of Computer Science and Design,

Kongu Engineering College, Tamil Nadu, India

¹{parinithavarshinis.22csd, perarivazhaganr.22csd, sivavishnuc.22csd}@[Link]

²[Link]@[Link]

Abstract-Lung cancer is provided to be the most fatal disease worldwide, whose hold machine learning classifiers in terms of predictions [6].
suffocated the highest population, most notably being based on the very early diagnosis of Models developed as an ensemble of models optimized using evolutionary algorithms, and
the disease by the majority of the patients. The conventional screening tests make it difficult the models such as VGG, ResNet, and Inception with deeper layers, were able to attain an
and expensive to reach lung cancer in certain regions. This research suggested a machine accuracy of approximately 98% for lung cancer diagnosis using a CT scan, which establishes
learning system by considering clinical and life-style information to forecast lung cancer the efficiency of image-processing methods [7]. Meta-analyzes conducted for the Western
susceptibility. These datasets were obtained in relation to 1157 patient records that contained and Asian population brought to light a significant disparity in the discriminative capability
sufficient clinical and behavioural details. We trained and tested several ML models of of models, which propounds the relevance of optimization for a particular part of the world
logistic regression, random forest, extra trees, gradient boosting, support vector machines, for such models [8].
XGBoost, and LightGBM by cross-validation. We employ the stacking ensemble to harvest Stacking ensemble learning systems using interpretable models for managing efforts in
their strengths of predictions. The complete system attained 95.69% accuracy together with model robustness and understandability in the context of a prognosis prediction task has
excellent precision, recall, and ROC-AUC values. This illustrates its potential for been proposed and experimented with in this context [9]. Lung health screening systems
performing an efficient lung cancer risk assessment. The research, therefore, incorporates incorporating the use of machine learning in their applications has established the utility of
SHAP-based explainability whereby interpretable results are delivered for medical decision- the aforementioned systems in various applications and implementations [10]. Stacking
[Link] paper highlights that hope to reduce delay in diagnosis and enhance the patients models incorporating traditional classifiers have demonstrated average detection accuracy of
outcomes and to find the risk of the disease at early stage and future works include up to 98.5% in this context using a combination of classifiers [3].
validation using real hospital data. Approaches using SMOTE, LASSO, and PCA have been devised to overcome the imbalance
Keywords—Lung Cancer Risk Prediction, Early Diagnosis, Stacking Ensemble, SHAP problem and enhance the methodology of feature selection [2]. The formulation of hybrid
Explainability, Risk Prediction. approaches using deep learning and machine learning has also been done to enhance the
I. INTRODUCTION optimization of clinical results in predicting cancer [1]. Efforts have also been made to apply
Lung cancer, after all, continues as one of the leading causes of cancer mortality. The the use of ensemble learning methodologies for the prediction of response and survival rates
treatments on hand have themselves improved significantly over time, but rates of survival to prove their significance in the field of predictive analytics for oncology [6]. The risk
will still largely depend on early discovery. Unfortunately, too many diagnoses are made prediction model for lung cancer using gradient boosting, which has been validated on a
only at points sufficiently advanced that therapy is likely less successful. CT scans and large dataset like NLST and PLCO, has a value for the AUC of around 0.82 [10].
biopsies, though extremely accurate among standard diagnostic tests, are very expensive and From the existing literature, one can observe the growing importance of the ensemble
not feasible for mass screening of populations. Machine learning methods appear to be a approach and interpretable models in the medical industry. However, the current status of the
tremendous substitute. to analyze lifestyle and clinical text data and risk. forecasting at an ensemble approach study in the medical industry primarily utilized image records or lacked
extremely low price. diversity among algorithms, along with the fact that the interpretable model was not
These models will detect the minor shifts in such areas as smoking, breathing problems, and considered during the ensemble approach. Unlike image-based algorithms [7], [8], the
peer influence that the physicians might not. characterize as standard [Link] proposed approach aims at the non-image attributes within the medical industry. This makes
learning, i.e., integrating several classifiers in such way to take advantage of them. The the approach more acceptable within the community-screening test. Additionally, the
maximization of respective strengths, was best effected. prediction accuracy. The methods proposed work bridges the gap that exists within the current status of the medical industry
reduce growth in the. dependability of slaves whenever a method produces. suboptimal study on the SHAP approach models within ensemble models [5], [9]. However, the stacked
solutions. Using behavioral and clinical statistics to construct a lung. cancer predictive ensemble architecture was not research-oriented.
ensemble machine-learning pipeline. SHAP explainable methods are used in the III. PROPOSED METHODOLOGY
identification. the strongest variables that motivate every prediction and creating trust and A system must literally and equitably assiduously come into existence through well-defined
transparency. Making the interpretation close and accuracy gap in the endeavor to develop systematic procedural blueprints; yet it is nearly a necessity with data because 1,157 patient
forward progress in early identification. records have been doggedly compiled onto 16 lifestyle and clinical traits to be available for
II. LITERATURE SURVEY analysis. The target variable is LUNG_CANCER; it is coded as "Yes" for 1 and "No" for 0
More recent studies have indicated the increasing application of machine learning and for easy understanding and analysis.
ensemble approaches in predicting the risk of lung cancer. Advanced machine learning Gender, smoking, and other symptoms categorical variables have also been quantitatively
approaches based on Explainable Artificial Intelligence have proposed novel preprocessing converted to be machine learning algorithm-friendly.
techniques such as SMOTE and Deep Learning to increase the credibility of predictions in a In this class imbalance, i.e., between cancer-positive and cancer-negative instances, SMOTE
clinical environment [4]. Approaches based on SHAP Explainability have been applied to was utilized with normalization to counteract the class effect of class imbalance between
ensemble machine learning approaches to improve the credibility and interpretability of being cancer-positive or not based on analysis performed during the process. The second
predictions in a clinical scenario [5]. Comparison studies performed on various machine step after preprocessing was the choice of model and hyperparameter tuning. Logistic
learning classifiers indicated that hybrid approaches perform better compared to individual regression, random forest, extra trees, gradient boosting, support vector machines, XGBoost,

979-8-3315-7120-7/25/$31.00 ©2025 IEEE


[Type here]

and LightGBM were trained and tuned by these seven classifiers. Systematically, hyper- selected among all possible thresholds with a view to node splitting in Extra Trees—a
parameter overfitting would be avoided using RandomizedSearchCV with stratified tenfold contrary approach from Random Forest, where the choice of best split is randomly sampled
cross-validated searches while ensuring each of the models hits the right proportion of from the set of features.
maximum performance and avoidance of overfitting. Gradient Boosting (GB):
Thereafter, it was thought that a stacking ensemble, combining the best from every one of Gradient boosting is another sequential boosting technique, where each subsequent model
the tuned models, would give them the best chance at outperforming the ensemble. attempts to predict the errors of the previous ones. The statistical objective of gradient
Selected base learners were added to the pipeline with logistic regression as a meta-classifier boosting is to reduce error of prediction, and this is achieved through the employment of
for the final prediction. It is a mixed forecasts method, employed as of combined forecasts. gradient descent optimization; thus, the method is significantly favored for high-internal-
even more than one algorithm would even out accuracy improved. accuracy classification problems. Gradient Boosting in lung cancer prediction identifies non-
The model was quantified in terms of standard. accuracy, precision, recall, F1 and ROC- linear trends between patient features and outcomes with very predictive strength but at the
metrics. AUC. The stabilization of the cross-validation would be done on a set of holdout cost of hyperparameter tuning to prevent overfitting, making it the most promising but
model and also getting the accuracy of result as well. SHAP was also very convenient when comparatively complex.
it comes to prediction of transformations and also with explainable fine-grained assessment Support Vector Machine (SVM):
on. the value of all the features to name specially of those very. Risk factors include age,
wheezing, chronic and smoking.
IV. DATASET or DATA PARTITION
The data, which was used in this analysis, was availed by Kaggle that had availed 1,157
records of patients with a blend of lifestyle, clinical, and behavioral data. The demographic
data would include gender and age so as to determine the more at risk group of lung cancer.
Smoking habits, alcohol addictions, and peer pressure are the backgrounds as well because
the mentioned habits tend to contribute to the risk factor of lung cancer. It is true that in the
data set there are certain other symptoms, which, according to certain definitions, are also
considered as precursor indicators of lung cancer such as coughing, wheezing, chest pain,
dyspnea, difficulty swallowing, fatigue, worry, and [Link] long-term conditions would
also impact the development and proliferation of the cancers and add additional information
to the clinical history of individual patients. All these attributes make it a thick and
informative data set and would be susceptible to productive predictive analysis.
The imbalance of the classes was moderate with 644 No Cancer and 513 Cancer. These
imbalances are usually found in medical data sets but would bias the models by providing an
unreasonable advantage to the majority class thereby making them useless and sparse the Support Vector machines are supervised learning in which the data is divided into two
desirable observations between the cases of potential cancer cases. classes using the optimal hyperplane. With kernel functions, it can project input features to
In order to correct the situation, Synthetic Minority Over-sampling Technique (SMOTE) was high-dimensional space and thus can handle complex and non-linear decision boundaries. In
applied in an attempt to generate fake data in the minority group. In this way, besides medical prediction issues like lung cancer diagnosis, the SVM generates high accuracy,
enhancing the overall application of the model to other new groups of patients it also especially when the number of features is reasonably large compared to the number of
promises to generalize the model to be validated to be used in the process of easing early examples.
detection which will be of relevant clinical decision-making. XGBoost (XGB):
ALGORITHMS: XGBoost (Extreme Gradient Boosting variant) was developed to be the superior version of
Logistic Regression (LG): gradient boosting, with regularization and good sparse data treatment. XGBoost has
Logistic regression, one of the simplest statistical modes of inference so far widely applied excellent processing speed and glorious machine learning competition results. XGBoost
to binary classification settings either for accepting or rejecting illness, was learned by input improves generalization by avoiding overfitting for lung cancer prediction and handles class
regressing over a particular class with assistance by the logistic (sigmoid) function imbalance very well. It is missing value treatment and feature. importance scoring,
probability. In lung cancer prediction, logistic regression identifies linear relationships
therefore, worthy to be a fundamental. healthcare beneficial algorithm.
between patient conditions (age, smoking history, or symptoms) and the likelihood of
LightGBM (LGB):
describing lung cancer. It would serve as a reliable baseline model against which more
LightGBM is a gradient boosting framework, which uses histogram-based algorithms and
complex ones would be measured due to its relatively good interpretability as well as
leaf-wise tree development to achieve faster training using less memory. LightGBM is very
simplicity of implementation.
efficient in terms of big data and the high-dimensional features. LightGBM, applied to lung
Random Forest (RF):
cancer prediction, is scalable; hence, it can be deployed in scalable medical risk evaluation
Random Forest is an ensemble algorithm that generates a multitude of decision trees during
systems which provides speed as well as accuracy. It was also supposed to be effective with
training and averages their predictions to increase accuracy and reduce overfitting. Every
class-imbalanced datasets, which is highly essential in the field of healthcare data whose
tree is developed based on a random sample of feature and data variables, providing
class distributions can be skewed.
diversity and reducing bias in the final outcome based on individual trees.
Stacking Ensemble:
Random Forest can be used to predict lung cancer risks with high efficacy in handling
The ensemble algorithm is stacking and it makes use of several. classifiers in order to deliver
categorical variables and continuous variables as well as noise protection. The model is
greater overall predictive performance. Rather than one model, stacking is not used here, but
being assisted in providing an approximation of the importance of the feature, thereby
the. prediction of multiple base learners (logistic regression, random) forest, SVM,
making clear which patient attributes (e.g., symptomatology, chronic illness, or smoking) are
XGBoost, etc., the ultimate prediction of which will be decided by a meta-model. Again, in
of greatest relevance to the predictions.
this instance, stacking. increased the consistency significantly: it was 95.69%. precision and
Extra Trees (ET):
98.13% ROC AUC on test set. This shows that ensemble learning provided a far better
Extra Trees, also known as Extremely Randomized Trees, is analogous to Random Forest
representing a very high-quality.
since it is another ensemble method with the only exception that in this instance, even
Dataset (Class distribution):
greater randomness is thrown at node splitting. Therefore, a single random threshold is
[Type here]

Fig. 1 tends to depict the kind of imbalance that exists within the lung cancer data before the properly defined pipeline of preprocessing lifestyle and clinical data. At the preprocessing

application of the SMOTE technique. Indeed, there is really strong differentiation between level, codings might need to be induced in categorical variables and SMOTE can be used as

the data of the cancer sort and that of the non-cancer sort. This kind of differentiation can a solution to data imbalance.

indeed affect machine learning algorithms such that the models will lack the ability to Once this preprocessing is done, feature selection and extraction must guide us to the most
important features in the context of lung cancer risk. These characteristics will then be
predict potential victims effectively. For this particular data set, there are indeed much
consolidated into a chain of classifiers: Logistic Regression, Random Forest, Extra Trees,
higher values of the non-cancer category compared to the total number of data within the
Gradient Boosting, Support Vector Machines, XGBoost, and LightGBM. Stacking ensemble
cancer category.
of these models' outputs will be created for enhancing the predictive performance as well as

Fig. 1. Class distribution of the lung cancer dataset before SMOTE. the strength of the prediction to make it more accurate.
During testing, new patient information will be preprocessed and features extracted
Fig. 2 above depicts the data distributions of the cancer and non-cancer classes, now according to the discussions so far, and then the patients will be labeled as Yes/No cancer
balancing them via SMOTE. risk. The system proposed will compare ensemble models based on their accuracy, precision,
recall, F1 score, and ROC AUC,while SHAP-based explainability will ensure the clinical
interpretability of the predictions. In the following table, the accuracy comparison of the

various machine learning models is summarized.


VI. RESULTS AND DISCUSSION
Table I below shows the accuracy comparison for all the machine learning models assessed.
TABLE I

ACCURACY COMPARISON OF MODELS

Algorithm Accuracy

Logistic Regression 0.92

Random Forest 0.93

Extra Trees 0.92

Gradient Boosting 0.93

Support Vector Machine 0.92

XGBoost 0.92

LightGBM 0.92

Stacking Ensemble 0.95

Fig. 4 shows the ROC curve achieved for the stacking ensemble method.

Fig. 4.

ROC

curve of

the

Fig. 2. Class distribution of the lung cancer dataset after SMOTE stacking

V. SYSTEM FLOW AND IMPLEMENTATION


The flowchart of the designed ensemble-based lung cancer risk prediction model has been
depicted in Fig. 3.

ensemble model.

Fig. 5 is the confusion matrix obtained for stacking ensemble, describing the distribution of
correct and incorrect predictions.
Fig. 5. Confusion matrix of the stacking ensemble model.

Fig. 3. Flowchart of the

proposed lung cancer risk

prediction methodology.

The objective of this


methodology
seems to be lung cancer risk
prediction based on a
[Type here]

Fig. 6 depicts the importance of features as revealed by an ensemble model. From the Table 1,The proposed model resulted in high performance compared to all
Fig. 6. Feature importance scores of the ensemble model. individual classifiers, confirming the robustness of the stacking strategy.
There are various modeling techniques considered such as Random Forests and
Gradient Boosting under ensemble techniques, which learned extremely well, in regards
to recognizing good patterns in the data set. Support Vector Machine is also as good
with complements in a highly complex feature space. Logistic Regression, however,
seems to have a hard time with this prediction task owing to its inability to handle
appropriately the non-linearity present in this data set. Overall outcomes indicate that
more robust ensemble techniques seem to be better in forecasting their risk to lung
cancer, but it might not be so in every situation practically.

VII. CONCLUSION
The goal of this paper is to propose a stacking ensemble framework integrated with
SHAP explainability for the prediction of lung-cancer risk from clinical and lifestyle
information. The proposed model achieved an accuracy and ROC-AUC of 95.69% and
98.13%, correspondingly, higher than the performance of individual classifiers. Finally,
SHAP analysis confirmed that smoking, chronic disease, and wheezing are main drivers
Fig. 7 depicts the SHAP summary plot that explains the overall contribution of the features of risk, in agreement with medical expectations.
to the risk of lung cancer. The main novelties consist of the combination of SMOTE-balanced preprocessing, cross-
validated hyperparameter optimization, and stacking for explainability integration, which
provides both accuracy and interpretability.
Limitations and Future Work: The data used in this work were taken from Kaggle and may
not fully represent real-world clinical diversity. Future work includes validation using real-
time hospital data for clinical reliability.

VIII. REFERENCES
[1] E. Dritsas and M. Trigka, “Lung cancer risk prediction with machine learning models,” Big Data
and Cognitive Computing, vol. 6, no. 4, p. 139, 2022.
[2] H. Tu, “Improving lung cancer risk prediction using machine learning versus classical models,”
Frontiers in Oncology, 2025.
[3] E. Alonso, “Survival stacking ensemble for lung cancer risk prediction,” Journal of Clinical
Oncology Informatics, 2024.
[4] A. Chakrabortty, “Augmented machine learning pipelines with explainable artificial intelligence,”
Frontiers in Artificial Intelligence, 2025.
[5] S. M. Ganie, “Interpretable lung cancer risk prediction using ensemble learning and explainable
artificial intelligence,” Computers in Biology and Medicine, 2025.
[6] V. Kumar, S. K. Singh, and R. Patel, “A multi-model framework for lung cancer risk prediction,”
Informatics in Medicine Unlocked, vol. 52, p. 101421, 2025.
[7] L. Zhou, X. Wang, and Y. Li, “FPA-based weighted ensemble for lung cancer CT scan
classification,” Scientific Reports, 2025.
[8] Y. R. Juang, K. Tanaka, and M. Lee, “Risk prediction models for lung cancer in Western and
Asian populations: A meta-analysis,” Scientific Reports, 2025.
[9] U. Arif, “Efficient and interpretable stacking ensemble for prognosis prediction,” Computers in
Fig. 7. SHAP summary plot for lung cancer risk prediction. Biology and Medicine, 2024.
[10] P.-L. Benveniste, J. Smith, and T. Rao, “External validation of a lung cancer risk prediction tool
Fig. 8 SHAP values waterfall chart is shown to interpret a single prediction in the ensemble using gradient boosting,” arXiv:2308.12188, 2023.

model.
Fig. 8. SHAP waterfall plot explaining an individual prediction.

You might also like