## 4 Discussion
\(MCC\) was calculated as an additional performance metric because of its reduced susceptibility to bias in imbalanced data sets, and it should be considered more frequently when interpreting classification results for easier performance comparison between different uneven sample sets. For validating classification performance, a cross-validation approach was used due to the limited sample size of only 65 teeth. Classical machine learning concepts, as proposed in our work, frequently utilize cross-validation since a larger proportion of the available datacan be used for classifier training and hence the sample's heterogeneity can be considered more reliably, improving classification performance and validity within the constraints of a small dataset [36; 37; 38]. By contrast, a hard train-test split would have severely reduced the number of teeth available for training and for validating the classification algorithm. Hence, the classification model's performance and the results' validity would have been negatively impacted. With stratified 10-fold cross-validation, a compromise was found to maintain strict separation of training and test data, while utilizing a larger sample size to ensure maximum classification performance and validity. This study shows that a reliable distinction between stained but intact enamel and stained lesions is possible with automated classification based on HSI measurements. Further studies should consider a larger sample size and generate an extensive spectral database of stained and stained lesion enamel to account for interindividual biological variance in enamel spectra and for different causes of stains, in an effort to improve classification performance. Especially the group of stained enamel, with its small number of samples in this study but heterogeneous appearance, would likely profit from such a database to ensure sufficient representation of its biological variety and prevent incorrect classification. A similar database for the 900-1700 nm wavelength region has been constructed [11; 46]. With a database's larger sample size, a train-test split would become feasible with negligible effects on classification performance and result validity. Moreover, the effect of using deep learning algorithms, as opposed to traditional machine learning algorithms, on classification performance should be explored. Multiple histological cross-sections per tooth should be considered, allowing precise evaluation of a tooth's entire fissure. In a later phase, results should be validated in vivo, considering the aggravating circumstances of plaque, saliva and possibly blood present on tooth surfaces. The real-time analysis of samples is important to develop to enable routine clinical application. In order to perform in vivo studies, compact handheld HSI devices for intraoral applications are needed. Currently, an endoscopic HSI camera is under development, which will be used in further studies. The following supporting information can be downloaded at: [[https://www.mdpi.com/article/10.3390/app12147312/s1](https://www.mdpi.com/article/10.3390/app12147312/s1)]([https://www.mdpi.com/article/10.3390/app12147312/s1](https://www.mdpi.com/article/10.3390/app12147312/s1)), Document S1: Custom computer code for data analysis. Conceptualization, F.T. and C.H. ; methodology, R.V. and F.T. ; software, F.T., J.G. and R.V. ; validation, R.V. and F.T. ; formal analysis, R.V., F.T. and J.W. ; investigation, R.V. and F.T. ; resources, R.V., F.T. and J.G. ; data curation, R.V., F.T. and J.G. ; writing--original draft preparation, R.V. ; writing--review and editing, F.T., C.H., J.W. and E.K. ; visualization, R.V. and F.T. ; supervision, C.H. and E.K. ; project administration, F.T. ; funding acquisition, F.T. and J.G. All authors have read and agreed to the published version of the manuscript. This project was supported by the European Union/European Social Fund (ESF) and the Free State of Saxony through the ESF junior research group \"Optical Technologies in Medicine\" (Project No. 100270108).