## 4 Discussion
The verification of the data models' efficiency was performed by 10-fold cross-validation. All algorithms were implemented in Python 3.9 and scikit-learn library. To obtain robust results, data standardization for PCA (mean value subtracting and dividing by standard deviation) was used. This step is useful if the data have a high level of variability, which is the case for THz spectra. Unlike PCA, the t-SNE algorithm considers the distances between data points in the original space, and it delivered better results without standardization. Euclidian and cosine distances for t-SNE were compared. The latter showed a better separability. The suggested ML pipeline allowed for selecting informative THz frequencies to differentiate CMI group 1 from CMI group 3 (see Figure 7). The informative features were 0.35, 0.45, 0.55, 0.7, 0.9, and 1.05 THz. These groups had an excellent separability, and the AUC was 0.99 for all classifiers (see Figure 6 and Table 3), which also confirms the correctness of the definition of CMI group 1 (day 7 after culture medium injection) as TBI. In Ref. [79], rat blood serum at different stages of experimental blast-induced traumatic brain injury (bTBI) was studied in the attenuated total reflection (ATR) mode by THz-TDS and ML methods. This study was carried out within 24 h after the experimental trauma. The THz absorption spectra were analyzed by combining PCA and two machine learning algorithms (k-Nearest neighbor and SVM) to identify the degree of bTBI. The SVM classifier provided the best results on the test set with the highest diagnostic accuracy of 95.5%. The authors concluded that ATR THz-TDS and ML have great potential for the early diagnosis of bTBI. However, the authors did not select informative THz frequencies to separate groups. The results of the pair-wise comparison of CMI group 1 and GBM group 3 to differentiate between TBI and glioblastoma are shown in Table 4 and Figure 8. The same frequencies obtained for SVM, RF, and Catboost, coupled with high performance metrics, imply the robustness of the used ML algorithms. The proposed ML pipeline allowed us to differentiate the TBI and GB groups with 95% sensitivity, 100% specificity, and 97% accuracy. The informative features for distinguishing TBI and GBM were 0.37, 0.40, 0.55, 0.60, 0.70, and 0.90 THz. A common strategy for the verification of feature selection procedures is the removal of these frequencies and then the calculation of performance metrics. This approach is good for non-correlating features, yet for the case of THz spectra, it is not so effective. To verify their importance, frequencies with the highest importance values but also a surrounding one should be removed. The experimental results showed a drop in the average sensitivity, specificity, accuracy, and precision of up to 13% for SVM, up to 7% for RF, and up to 17% for Catboost. This proved that the selected frequencies were indeed informative for the task under study. In our previous study of mouse blood serum and the dynamics of U87 glioblastoma development using THz-TDS [58], the ML pipeline included THz spectra smoothing using the Savitsky-Golay filter, outlier removal using the isolated forest method, the subtraction of the mean and normalizing data to the standard deviation, informative feature extraction, and dimensionality reduction by PCA. The predictive data model was created using linear SVM. By comparing GBM group 3 (the 21 st day after U87 cell injection) and the corresponding control group 3 (the 21 st day after culture medium injection), the following informative THz frequencies differentiating these groups were selected: 0.22, 0.56, 1.0, 1.2, 1.48, and 1.52 THz. As can be seen, these informative frequencies did not overlap with those selected in this study. A possible reason for this was that TBI and GBM were compared here, contrary to the GBM versus healthy groups study in the previous work. We cannot accurately indicate specific metabolites, because the molecules' absorption bands overlapped in the THz spectral range.