## 2 Materials and Methods
### Methods
#### 2.2.5 Improved Random Forest  
Several authors have proved that the random forest (RF) [38] is a significant machine learning algorithm for the classification of pulmonary nodules. RF is computationally effective in solving problems with noisy data and overfitting. It is a combination of multiple decision trees \(h_{1}(x),\ h_{2}(x),\ \ldots\ h_{K}(x)\), where \(x\) is a group of input samples, and \(K\) is the total number of trees in the forest. Each tree \(h_{i}(x),\ \ i=\{1,\ 2,\ \ldots K\}\) works in parallel and produces its own prediction \(p_{i}\) independently. The final prediction result of RF is decided by major voting and finding the winning class among \(p_{i}\). Individual tree \(h_{i}(x)\) is grown on a random subset of samples \(R_{i}\,\ i=\{1,\ 2,\ \ldots K\}\) from the training data \(T\) with replacements. The number of sample \(n\) in each random subset \(R_{i}\) is the same. RF does not use all the samples \(n\) in \(R_{i}\) for the training of individual tree. It only uses 36.8% of \(n\) for training and the rest are used for internal validation. Suppose \(R_{i}(x)\) is a random subset that has a group of samples \(x\). Each sample in x has attributes \(A_{i}\,\ i=\{1,\ 2,\ \ldots a\}\), where \(a\) is the total number of attributes. However, RF does not use all the attributes \(A_{i}\) to grow the trees. Instead, it selects random attributes \(A_{r}\) by calculating the Gini values of \(A_{i}\). \[Gini\ (A_{i})=-\sum_{i=1}^{c}p(y_{i})^{2}\ +\sum_{j=1}^{m_{i}}p\Big{(}v_{i,j} \Big{)}\sum_{i=1}^{c}p\Big{(}y_{i}\Big{|}v_{i,j}\Big{)}^{2} \tag{19}\]  
where \(c\) is the total number of classes and \(p(y_{i})\) is the probability of the class \(y_{i}\). Each attribute \(A_{i}\) has values \(v_{j}\) where \(m_{i}\) is the number of values and \(p\Big{(}v_{i,j}\Big{)}\) is the probability that the attribute \(A_{i}\) has the value \(v_{j}\). Then, \(p\Big{(}y_{i}\Big{|}v_{i,j}\Big{)}\) is the probability of the class \(y_{i}\) conditioned by the attribute \(A_{i}\) having value \(v_{j}\). The Gini calculation is easy and fast because it evaluates the attributes separately without considering the conditional dependencies and interactions with other attributes. As a negative impact, \begin{table}
\begin{tabular}{c c c} \hline \hline
**Features** & **Name** & **Formula** \\ \hline \multirow{5}{*}{**Geometric**} & Surface area & \(surface\ area=\sum N(x,y,z)\) \\ \cline{2-3}  & Perimeter & \(perimeter=\sum edge(N)\) \\ \cline{2-3}  & \multirow{2}{*}{Effective radius} & \(radius\ (2D)=perimeter*\frac{\sqrt[3]{Surface area}}{n}\) \\  & & \(radius\ (3D)=perimeter*\sqrt[3]{\frac{3 surface area}{4\pi}}\) \\ \cline{2-3}  & Centroid & \(centroid=mean\ (N(x,y,z))\) \\ \cline{2-3}  & Minor axis length & \(minor\ axis\ length=min\ (N(dx,dy,dz))\) \\ \cline{2-3}  & Minor axis length & \(major\ axis\ length=max\ (N(dx,dy,dz))\) \\ \cline{2-3}  & Elongation & \(elongation=\frac{minor axis length}{major axis length}\) \\ \hline \multirow{5}{*}{**Geometric**} & Volume & \(volume=\) \\ \cline{2-3}  & Volume & \(surface\ area*xspacing*yspacing*zspacing\) \\ \cline{2-3}  & Sphericity & \(sphericity=\frac{volume}{surface area}\) \\ \cline{2-3}  & Compactness & \(compactness=\frac{volume}{number of elements(N)}\) \\ \hline \multirow{5}{*}{**Intensity and**} & Mean & \(mean=\frac{1}{n}\sum\limits_{(x,y,x)\in N}G_{N}(x,y,z)\) \\ \cline{2-3}  & Standard deviation & \(\sigma=\sqrt[1]{\frac{1}{n}\sum\limits_{(x,\ y,z)=}\left[G_{N}(x,y,z)-mean\right] ^{2}}\) \\ \cline{2-3}  & Skewness & \(skewness=\frac{\sum_{(x,y,z)\in N}\left[G_{N}(x,y,z)-mean\right]^{3}}{n\alpha^{3}}\) \\ \cline{2-3}  & Kurtosis & \(kurtosis=\frac{\sum_{(x,y,z)\in N}\left[G_{N}(x,y,z)-mean\right]^{4}}{n\alpha^{4}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Features extracted and the mathematical formulae. the performance of the RF may degrade when the attributes are strongly dependent on each other.