## 2 Materials and Methods
### Proposed GP-Based Feature Construction Approach
#### 2.3.4 GP-Based Feature Construction Algorithm  
Algorithm 1 shows the general feature construction pseudocode using GP [27]. This algorithm requires an input radiomic feature set, where each sample comprises 105 original radiomic features associated with an actual class label defined by non-survivor or survivor classes. First, in line 1, the ramped half-and-half method creates the initial population, where each individual has \(m\) trees with maximum \(l_{\text{max}}\) levels [42]. Next, each individual's fitness is calculated in line 6, where 5-fold cross-validation is used to split feature data into training and validation sets. The former is used for training two LR models (i.e., using original radiomic features and constructed ones), whereas the latter calculates \(\text{AUC}_{\text{in}}\) and \(\text{AUC}_{\text{out}}\); thus, the individual's fitness is the mean fitness value in validation data. Notice that this strategy avoids prediction model overfitting. Further, in line 11, the elite-preserving mechanism determines the next generation, where parents and offspring are merged and descendingly sorted according to their fitness. So, the first 50% of the sorted individuals are taken as the population for the next generation [43]. Finally, the algorithm's output is the individual with the highest fitness value after \(g_{\text{max}}\) generations. Algorithm 2 shows the pseudocode of crossover and mutation operators to create offspring in line 11 of Algorithm 1, where just one operator is executed according to a mutation probability \(p_{m}\in(0,1)\). These two genetic operators evolve the population in the following manner: (i) crossover, where two individuals are selected for interchanging randomly selected subtrees to produce two new individuals, and (ii) mutation, where an individual is selected for replacing a randomly selected subtree with a randomly generated subtree to produce a new individual. Notice that in lines 2 and 7, the tournament selection method chooses one or two individuals for mutation or crossover. In lines 3 and 8, one tree is randomly picked from a selected individual to crossover or mutate. It is worth mentioning that the crossover operator requires a crossover probability to bias the cut-off point to function or terminal nodes. Each selected individual then switches subtrees at their cut-off points. Usually, function nodes are more likely to be chosen as the crossover point than terminal nodes to avoid surpassing the maximum tree depth. If the size of a new individual exceeds the maximum allowed depth after the operation, it is excluded from the candidates to form the next generation. This criterion also applies to the mutation operator. ```
1:radiomic feature set; number of trees \(m\); maximum tree depth \(l_{\text{max}}\); maximum number of generations \(g_{\text{max}}\)
2:best individual \(\mathbf{z}_{\text{best}}\)
3:Initialize population: each individual \(\mathbf{z}\) has \(m\) trees with maximum \(l_{\text{max}}\) levels
4:\(\mathbf{z}_{\text{best}}\) is the first individual
5:while\(g_{\text{max}}\) is not reached do
6:for all\(\mathbf{z}\) in the population do
7: Create a new feature set with \(m\) predictors from radiomic features
8: Evaluate fitness function \(f(\mathbf{z})\)\(\triangleright\) Equation (2)
9:if\(f(\mathbf{z})>f(\mathbf{z}_{\text{best}})\)then
10:\(\mathbf{z}_{\text{best}}\leftarrow\mathbf{z}\)\(\triangleright\) Update the best individual
11:endif
12:endfor
13: Create the next generation using genetic operators\(\triangleright\) Algorithm 2
14:endwhile
```  
**Algorithm 1** Feature construction using GP with multi-tree representation. The proposed GP-based approach was developed in MATLAB R2022b (The Mathworks, Boston, MA, USA), and the source codes are available at [[https://github.com/wgomezf/GP-radiomics](https://github.com/wgomezf/GP-radiomics)]([https://github.com/wgomezf/GP-radiomics](https://github.com/wgomezf/GP-radiomics)) (accessed on 4 August 2024).