## 4 Applying Convolutional Neural Network (CNN) to Gene Expression Data in Formed Clusters
#### 5.2.2 Results of Patient State Diagnosis Based on the Use of Convolutional Neural Network  
In the current modeling to identify the type of cancer or patient state, a one-dimensional two-layer convolutional neural network (CNN) was used. The kernel size was set at 8, and the density of the dense layer was set to 256. The parameters of the filters used when using gene expression data from different cluster structures are presented in Table 2. The data distribution for training and testing the model was the same as in the previous models: 65% of the data were used for network training, and 35% (1140 samples) were used for testing. The simulation results regarding the application of CNN for classifying samples that made up the test data subset are presented in Figure 9.  
Figure 8: Simulation results regarding the use of the random forest algorithm to solve the multi-class problem of identifying the health status of patients investigated for different types of cancer.  
The analysis of the simulation results allowed us to conclude that using four- and six-cluster structures when applying the CNN is also more attractive for identifying the type of cancer compared to three- and five-cluster structures. However, the difference in the sample identification results in the case of using CNN was significantly smaller compared to using the random forest algorithm classifier. Moreover, it should be noted that the training time for the CNN model was significantly shorter compared to the random forest algorithm classifier. The analysis of the simulation results also allowed us to conclude that using the six-cluster data structure when applying CNN allowed for better and more stable classification results for all samples and corresponding to all types of cancer, including samples from patients in whom cancer was not detected. However, it should be noted that, in the case of using the six-cluster structure, the state of 31 samples out of 1140, which made up the test data, was identified as undefined, which means that the results of applying different gene expression data clusters may contradict each other when determining the type of cancer. In this case, additional clinical research is necessary to determine the patient's state or type of cancer unambiguously.  
The results obtained regarding using a CNN for identifying the state of the investigated object based on gene expression data indicated the high effectiveness of the diagnostic system utilizing a CNN as a classifier. The use of the complete set of gene expression data also allowed obtaining a high accuracy of data classification, but questions may arise regarding the objectivity of the results. The formation of clusters of differentially expressed and mutually correlated gene expression profiles increases the objectivity of decision-making regarding the state of the object, by parallelizing the information flow, forming intermediate decisions based on gene expression data from different clusters, and making a final decision on the state of the corresponding object using an alternative voting method.  
A comparative analysis of the simulation results obtained using the random forest algorithm and the CNN for gene expression data allowed us to conclude that both models were highly effective, but as mentioned above, the CNN's training time was significantly shorter. If the random forest model was trained on the data for approximately 70 h, then the CNN model was trained for approximately 10 min. However, in terms of the classification accuracy and criteria values determining the first and second types of errors, the four-cluster structure when using the random forest algorithm allowed for better object identification results compared to the six-cluster structure when using the CNN. In both cases, 31 objects were identified as undefined.  
Figure 9: The simulation results regarding the application of CNN for solving the multi-class problem of identifying the state of patients studied for different types of cancer.