## 1 Introduction
Our investigation has indicated that existing rapid methods for urea detection in fish may exhibit certain limitations, including the necessity for sample preparation and prolonged detection times. Therefore, the development of novel approaches is warranted to address these challenges. Recently, near-infrared (NIR) spectroscopy, coupled with machine learning (ML) techniques, has gained traction as an analytical approach for determining chemical composition and/or classifying food quality [10; 11]. The NIR region, spanning wavelengths from 780 to 2500 nm, offers deep penetration into chemical substances [10; 11]. Recent research [12] has demonstrated the efficacy of combining NIR spectroscopy with ML for the rapid and non-invasive evaluation of fish quality, encompassing both quantitative and qualitative aspects. This innovative approach has been successfully employed to predict various fish attributes, including freshness [13; 14; 15; 16; 17], fat content [18; 19; 20], species identification [21; 22], and geographical origin [23; 24; 25; 26]. The application of NIR spectroscopy coupled with ML extends beyond the fishing industry, proving values in diverse food quality control ecosystems. Notable examples include the detection of meat [27] and milk [28] adulteration and other aspects of fruit quality assessment [29]. It is expected that the recent development of low-cost handheld NIR spectrometers, along with ML, has opened up the possibility of developing rapid and on-site analysis methods for urea content based on NIR spectral measurements. To address the limitations of existing rapid methods and support risk-based inspection, this study explores the potential of NIR spectroscopy coupled with ML for the rapid and non-destructive classification of raw fish samples based on urea content. Specifically, we aim to develop a novel method based on NIR spectroscopy and ML techniques to detect urea in fish meat with a LOD of 1000 ppm, but without sample preparation and with a reduced detection time. This innovative approach could streamline safety assessments within the seafood industry, enabling efficient product management and reducing losses. Moreover, regulatory bodies could utilize this technology to enhance their inspection protocols. For developing a urea detector with a LOD of 1000 ppm based on the coupling between ML and NIR spectroscopy, the development of an ML pipeline is necessary. This pipeline should be capable of accurately classifying the urea content of a fish sample as either Safe (below 1000 ppm) or Unsafe based on its NIR spectrum. To achieve this, a NIR spectrum dataset of multiple fish samples with various urea contents belonging to the two safety classes needs to be collected. Subsequently, various combinations of feature extraction techniques and potential ML models should be evaluated on the NIR dataset to identify the combination yielding the highest performance. Regarding the NIR spectral measurement of a fish sample, an important question arises concerning the relative importance of distinct anatomical regions of a fish in the classification problem of their urea content. Different hypotheses could be formulated due to the lack of previous studies in this field. Thus, this study will also identify the optimal location within a fish's body to measure the NIR spectrum for accurate identification of the safety class of the given fish sample. The optimal measurement location could be either a specific position or any. In the latter case, the identification of the safety class based on urea content is considered position independent.