## 4 Discussion and Conclusions
Because the dataset created on the lumpectomy specimens was not enough to develop reliable classification algorithms, we aimed in this study to develop classification algorithms with the slices dataset and apply these on the lumpectomy specimens for classification. However, this approach proved to be insufficient for obtaining good classification results. The problem of slightly different training and testing datasets is a known problem in the field of machine learning, which can be accounted for by using transfer learning and domain adaptation techniques [30]. Therefore, an algorithm trained on the tissue slices would be re-purposed to classify the lumpectomy data. However, such a technique requires much more lumpectomy data than the data available in this study. In general, to improve the classification results on the lumpectomy specimens, the amount of lumpectomy data, and especially the number of malignant locations, should be increased. This can be achieved, for example, by cutting the resection specimen by cauterization further after performing the standard procedure for breast-conserving surgery. Therefore, the surgeon would increase the number of tumor-positive margins that can be optically measured, without affecting the current clinical workflow and clinical outcome. Obtaining a larger lumpectomy dataset would allow for the use of transfer learning or the training of classification algorithms on lumpectomy data instead of slices data. By doing so, no wavelengths need to be removed to correct for sample thickness differences and the entire spectral range of our cameras, i.e., all wavelengths, can be used for creating algorithms. In summary, we presented a methodology to obtain a high correlation of hyperspectral measurements on lumpectomy specimen with histopathology and showed that this allowed us to mark 4 out of 5 tumor positive margins that were not visible with the human eye. In addition, we showed that classification algorithms developed on tissue slices could not be used directly on lumpectomy data. After wavelength reduction to limit the sampling depth, adipose tissue could be clearly discriminated from other tissue types but differentiating malignant from connective tissue was more challenging. For improved discrimination between malignant and connective tissue, the amount of lumpectomy data, and especially the number of malignant locations, should be increased so that classification algorithms can be adapted and trained on lumpectomy data. E.K. : Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Writing--original draft, Writing--Review & Editing. B.D. : Conceptualization,Methodology, Software, Validation, Formal analysis, Investigation, Writing--Review & Editing. J.S. : Resources, Writing--Review & Editing. M.-J.T.F.D.V.P. : Resources, Writing--Review & Editing. F.v.D. : Resources, Writing--Review & Editing. H.J.C.M.S. : Conceptualization, Methodology, Resources, Writing--Review & Editing, Funding acquisition. T.J.M.R. : Conceptualization, Methodology, Resources, Writing--Review & Editing, Funding acquisition. All authors have read and agreed to the published version of the manuscript. This research was funded by the Dutch Cancer Society grant number KWF 10747. This study was conducted at The Netherlands Cancer Institute (NKI-AVL) under approval of the internal review board (CFMPB545). This study was performed in compliance with the Declaration of Helsinki and approved by the Institutional Review Board of The Netherlands Cancer Institute/[PERSON] (Amsterdam, The Netherlands). According to Dutch law (WMO), no written informed consent from patients was required. The data presented in this study are available on request from the corresponding author. The data are not publicly available.