# Integrating Machine Learning Algorithms: A Hybrid Model for Lung Cancer Outcome Improvement
## 3 Results  
The preliminary data analysis categorized cases into positive and negative lung cancer diagnoses, revealing 238 positive and 38 negative cases. Figure 2 illustrates the correlation values between variables, where positive values near 1 denote strong positive correlations, and negative values near \(-1\) indicate strong negative correlations. Moderate positive correlations include anxiety and swallowing difficulty (0.48) and alcohol consumption and allergy (0.38). Negative correlations include alcohol consumption and yellow fingers (\(-0.27\)) and anxiety and coughing (\(-0.22\)). Insignificant correlations, such as alcohol consumption and swallowing difficulty (\(-0.00063\)), suggest no meaningful relationship. Table 4 presents model evaluation metrics prior to cross-validation. SVM, Random Forest, and Gradient Boosting exhibited the highest accuracy (0.98), with KNN achieving the highest precision (1.00) but lower recall (0.91). For recall, SVM, Random Forest, and Gradient Boosting outperformed the rest with 0.98. The F1 score reaffirmed their robustness (0.98), ensuring balanced precision and recall. AUC analysis highlighted Random Forest and decision tree as the most discriminative (0.96), while multinomial naive Bayes underperformed, having the lowest accuracy (0.81) and AUC (0.74). Figures 3 and 4 provide a comparative visualization of model performance across various metrics. Specifically, Figure 4 highlight the ROC curves of nine different algorithms. ROC, which stands for Receiver Operating Characteristic, helps evaluate the performance of classifiers by illustrating the trade-off between true positive and false positive rates at various threshold levels. Figure 5 shows a comparison of the accuracy of the existing and proposed machine learning models for the prediction of lung cancer. The proposed enhancements significantly outperformed the rest in terms of performance. Therefore, the refined methodologies have proven to be more effective. Table 5 shows a comprehensive comparison of accuracy across different ML and DL models. The proposed methods are better compared to existing approaches. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model** & **Hyperparameters** \\ \hline Logistic regression & L2 penalty, C = 1.0, solver = “lbfgs”, max. iter = 100 \\ K-nearest neighbors (KNN) & n\_neighbors = 5, weights = “uniform”, algorithm = “auto’, leaf\_size = 30 \\ Support vector machine (SVM) & kernel = “rbt”, gamma = “auto’, C = 1.0, degree = 3 \\ Decision tree & criterion = “gini”, max.depth = None, min\_samples\_split = 2 \\ Random Forest & n\_estimators = 100, criterion = “gini”, max\_depth = None, bootstrap = True \\ Multilayer perceptron (MLP) & hidden\_layer\_sizes = (100), activation = “sigmoid”, solver = “adam”, alpha = 0.0001 \\ Gradient Boosting & n\_estimators = 100, learning\_rate = 0.1, max\_depth = 3, subsample = 1.0 \\ Multinomial naïve Bayes & alpha = 1.0 \\ Gaussian naïve Bayes & var\_smoothing = 1e-9 \\ Hybrid model & “n\_estimators”: [50, 100, 200], “learning\_rate”: [0.01, 0.1, 0.5, 1.0], “algorithm”: [“SAMME”, “SAMME.R”] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Applied optimal tuning parameters for individual models. The ensemble methods proved significant gains. Random Forest, using multiple decision trees to reduce overfitting, achieved a 9.69% gain (85.71% to 95.40%). Through boosting that ought to improve predictions, Gradient Boosting achieved a 6.32% gain (89.29% to 95.61%). MLP is a deep learning technique used for intricate feature interactions, and it achieved a gain of 4.84%, from 89.29% to 94.13%. Figure 4: ROC of the proposed ML and DL models.