# Hyperspectral Superpixel-Wise Glioblastoma Tumor Detection in Histological Samples
## 3 Experimental Results
### Supervised Classification Results
#### 3.2.1 Validation Results  
Using the aforementioned superpixel dataset, we used the training data of each fold for training a supervised classifier, and we employed the validation data of each fold to optimize the hyperparameters to increase performance. In this section, we describe the results obtained by using SVMs with linear kernel as classifier. Random Forest and 1-D Convolutional Neural Networks (CNNs) were also evaluated, but the performance of those classifiers was not competitive. For RF we used the MATLAB Machine Learning Toolbox, while 1-D CNN experiments were carried out using the TensorFlow implementation of the Keras Deep Learning API [29; 30]. Average validation sensitivity and specificity results of the 1-D CNN classifier were \(66.0\pm 31.4\%\) and \(60.8\pm 44.2\%\), respectively. Regarding RF classification, the sensitivity and specificity results were \(59.3\pm 43\%\) and \(62.3\pm 24\%\), respectively. Due to the inadequate performance on the validation set, these classifiers were not further evaluated in the subsequent experiments. In order to tune the hyperparameters of the supervised classifier, the model was trained using the training data, and the performance of the model was evaluated using the validation set. This process was repeated several times by varying the hyperparameters' values to find the optimal hyperparameters which provided the best performance on the validation set. Finally, the performance of the tuned model was evaluated using the test set. Figure 8: Different SLIC segmentation results depending on the distant hyperparameter (\(m\)). The rows present different image area example around a superpixel centroid (red cross). The first column shows the synthetic RGB image of the area and the remaining columns shows the distance between the superpixel centroid and the rest of pixels in the area with different values of \(m\). In this investigation, we performed the classification independently for each fold. Additionally, we proposed several optimization strategies for the hyperparameter optimization. Due to the large number of superpixels in each training fold, the time required to train a linear SVM classifier was about 21 hours. Although this computation time is not prohibitive, the required number of iterations to find the optimal hyperparameter in each fold drastically increased the execution time for finding the optimal classification models. In order to alleviate these training times for each fold, we decided to divide the training data into 10 different data partitions, and then train an ensemble of 10 different SVM classifiers. We first proved there was no performance drop when using the SVM ensemble compared to using all the training data at once. Then, we realized that when using the SVM ensemble the execution time required to train a single fold decreased from 21 hours to 4 hours, which made hyperparameter optimization possible in a reasonable time. For linear SVM, the cost value was the hyperparameter to be tuned. Instead of performing a grid search of the hyperparameters, we searched the optimal hyperparameters by using a Bayesian optimization algorithm [31]. Due to the imbalanced nature of our dataset, we proposed the use of BA and sensitivity metrics as optimization functions to be minimized. In this case, ACC is not a good metric to be optimized, since it would produce models that are more specialized in detecting the majority class of the dataset. In this optimization framework, the values of cost were bound between \(10^{-5}\) and \(10^{5}\). Table 1 shows the final validation results for each fold using the linear kernel with the default cost value (\(C=1\)) and with the optimal hyperparameters obtained using the BA and the sensitivity metrics. The most relevant outcomes of these results are the following. First, we can see that hyperparameter optimization has a positive impact in the classification results, achieving an increase of 16% (ACC), 29% (sensitivity), 13% (specificity), 29% (PPV), and 28% (F1 metric).