# A Machine Learning and Radiomics Approach in Lung Cancer for Predicting Histological Subtype
## 3 Methods
### Feature Selection  
Before setting up the classification stage, data were preliminarily processed. In the first phase, we applied z-score normalisation. Then, we considered techniques for reducing the dataset dimensionality. We exploited the algorithm presented in [PERSON] et al. [20] to eliminate the features of D1 mostly correlated among them. This algorithm iterates over each couple of features and discards those with a correlation value higher than a threshold, set to 0.5. The procedure allowed us to retain 29 uncorrelated features. Figure 3 shows the correlation matrices before and after the aforementioned features reduction phase. In particular, it should be noted that clusters of correlated features, evident in Figure 3a, are not present anymore in Figure 3b. In order to determine the discriminating relevance of each feature, we performed on D1 a cross-validation procedure with a univariate logistic regressor, assessing the mean AUC obtained. We then selected the features which satisfied the following equation: \(mean(x_{i})-\frac{1}{2}\cdot std(x_{i})>0.5,i=1,...,m\), where \(m\) is the number of features. Figure 4 shows the results of the univariate logistic regression analysis. The choice of employing 1/2 standard deviations as features inclusion criterion allowed us to not discard too many of them in the univariate analysis, since they could result in being helpful in the subsequent multivariate model for the classification task. This analysis allowed us to retain 10 features in D1. The same features were also retained from D2 and D3. A statistical analysis was conducted in order to investigate how the features distribute in D1 between patients with adenocarcinoma and patients characterised by other histological subtypes. The Mann-Whitney \(U\) statistical test was used for unpaired comparisons between the features of subjects with adenocarcinoma and subjects with other histological types of cancer. A correction for multiple testing, using the Benjamini-Hochberg method was conducted for all the resulting \(p\)-values. Corrected \(p\)-values lower than 0.05 were considered significant. The statistical analysis revealed three significant features, namely the original_glcm_Autocorrelation (\(p=0.001\)), the wavelet-LHH_firstorder_Median (\(p=0.003\)) and the original_firstorder_Mean (\(p=0.016\)). Figure 5 shows the box plots for the features selected in the features reduction step. In particular, the distributions of the statistically significant features are different among patients with adenocarcinoma  
Figure 4: AUC for univariate logistic regression. The blue bar represents the mean AUC obtained in the 10-fold cross-validation, whereas the orange bar depicts \(\frac{1}{2}\) standard deviations. Features marked with * satisfy the condition for being retained after univariate analysis. Figure 3: Correlation matrices on the features extracted from D1. (**a**) Correlation matrix before features reduction (\(k=495\)). (**b**) Correlation matrix after feature reduction (\(k=29\)). with respect to subjects with other histological types of cancer. For visualisation purposes, normalised values have been clipped in the range \([-4,4]\), so that outliers do not alter the range of visibility of the boxplots. This difference between the distributions of the statistically significant features can also be seen in Table 2, where summary statistics for the distribution of the features, z-score normalised, is reported. For each feature, Table 2 reports the mean, the median, the standard deviation and the interquartile range for each of the two conditions, and the corrected \(p\)-value. The statistical analysis was carried out with Python 3.7, using the scikit-learn 0.22.2, numpy 1.21.5 and scipy 1.7.3 libraries. Visualisation was performed with matplotlib 3.5.1 and seaborn 0.10.0 libraries. Figure 5: Box plots of the selected features. Feature distributions are shown on the data from D1 images. Normalized values have been clipped in the range \([-4,4]\), to avoid that some outliers will after the nature of the boxplots.