# Evolving Optimised Convolutional Neural Networks for Lung Cancer Classification
## 2 Materials and Methods
The training-validation data split was randomised with rations between 10/90 and 60/40 for each performed CNN. Since the pre-processed CT-scans did not carry significant information which would be accessible by the RGB channel only, the transformation to the singular, monochrome format is not to impact classification performance whilst reducing the necessary use of computational resources. All generated monochrome NumPy arrays were subsequently transformed by using PyTorch. The pre-processed data were then converted into Tensor images with dimensions of 1 \(\times\) 32 \(\times\) 32 (input channels \(\times\) height \(\times\) width). Here, normalisation and additional, randomised horizontal flipping of all images was performed. During the fitness evaluation, a fitness function evaluated all individuals per generation. Individuals whose genome encoded for CNNs with final validation performances below 50% were deemed unfit, and therefore were assigned a fitness score of 0. All other individual's fitness values were derived by their classification performances using cross-validation. The utilised GA design was developed to increase the depth of the CNN depth and therefore, its classification capability [14]. Hence, fully connected layers were replaced with skip layers, which can prevent the overfitting of the model. Following the mutation, the environmental selection was conducted by deploying the binary tournament selection approach, which is commonly used in single-objective optimisation with CNN-GAs [14, 39]. Upon the selection of individuals, variable crossover and mutation relied on randomisation. Therefore, it was possible that, via genetic drift, the currently fittest individual and its corresponding genome may be deconstructed during either of the previously described random procedures [40]. Therefore, elitism was implemented by checking whether the fittest individual had already been selected to generate the new offspring for the next generation. If the fittest individual is not represented by the new parent generation yet, it will replace the least fit individual in the list of the current selection, which ensures the survival of the fittest individual. After each generation, a new population was initialised with all selected individuals and their freshly acquired genome. After evaluating and ranking all individuals according to their fitness, parents for the new generation were selected to generate new offspring for the new generation via mutation and crossover functions. In this paper, CNN building blocks were implemented as per the proposal by [PERSON] et al. shown in Figure 4.  
Figure 4: Conceptualised overview of one possible network architecture of the utilised GA’s building blocks with skip-connections (blue) between layers (orange). The grey hyperparameters of each layer are variable; the CNN network architecture shown here would be represented by the genome as “64-0.2-256-0.8-512”. The utilised genetic algorithm encodes CNN architectures with a variable genome length. This means that layer counts can vary, which gives more flexibility when adapting the overall network architecture. Please note that the resulting genome encodes pooling layers and skip layers, as this setup was inspired by Resnet's architecture, which demonstrated high performances with the described skip layer-based network architecture [41, 42].