Utilizing VIS-NIR Technology to Generate a Quality Index (Qi) Model of Barhi Date Fruits at the Khalal Stage Stored in a Controlled Environment

Saudi Arabia is a prominent producer of dates, producing 1.6 million tons annually. There is a need to evaluate the physical properties and quality of fruits non-destructively and then modeled and predict them throughout the storage period. The aim of the current study was to generate a quality index (Qi) and visible–near-infrared spectra (VIS-NIR) models non-destructively to predict properties of Barhi dates including objective and sensory evaluations. A total of 1000 Barhi fruits were sorted into three stages of maturation, ranging from 80 to 100% yellowish. The physical properties (hardness, color, TSS, pH, and sensory evaluations) of Barhi dates were measured and modeled with Qi based on VIS-NIR of fresh Barhi fruits and during storage in ambient (25 °C), cold (1 °C), and CA (1 °C with 5%:5% O2:CO2, 85% RH) conditions for up to 3 months. The prediction of Qi was non-destructively based on VIS-NIR utilizing PLSR and ANN data analysis. The results showed that the shelf-life of stored Barhi fruits were 20, 40, and 120 days corresponding to 25 °C, cold (1 °C), and CA, respectively. It was found that VIS-NIR spectroscopy was helpful in estimating the Qi of Barhi fruits for PLSR and ANN data analysis, respectively, in calibration with an R2 of 0.793 and 0.912 and RMSEC of 0.110 and 0.308 and cross-validation with an R2 of 0.783 and 0.912 and RMSEC of 0.298 and 0.308. The VIS-NIR spectrum has proven to be an effective method for the evaluation of the Qi of Barhi fruits and their physical properties throughout the supply chain in the handling, processing, transportation, storage and retail sectors. It was found that ANN is more suitable than PLSR analysis.


Introduction
Saudi Arabia produces more than 14% of the world's total production of dates, viewing the date palm as the most important fruit tree in country.Barhi dates fruits are tasty, physiologically mature, crisp and firm during the Khalal stage (yellow in color) of maturation [1].They are also perishable and have a high moisture content of 66% to 75% (wet bases) and water activity 0.95 to 0.97.In this region, Barhi fruits during the Khalal maturation (Bisr) were mainly chosen because of their desirable texture, sweetness, and great flavors [2].Researchers, food innovators and producers, consumers, and health experts are emphasizing the need for food quality for fruits to be more palatable, healthy, natural, and wholesome.
Fruit losses on farms may reach as high as 25% due to the huge production of Barhi dates over a short season and the lack of commercial means to maintain fresh Barhi at its Khalal maturation stage, which causes a drop in fruit prices during the peak season.Towards the end of the season, Barhi prices gradually rise, reaching as much as ten times the price of that of the average season price [3].
Cooling plays a significant role in decreasing the biological activities, respiration rate and enzymatic activities during storage.Several studies have indicated that any delay in cooling harvested fruits leads to water losses of up to 50% [4].Etiolation of the fruit surface as well as changes in physical qualities (e.g., weight, density, and color) result from this water loss.Furthermore, moisture losses may lead to an increase in sugar component [5].
Controlled atmospheric (CA) storage is a postharvest preservation technique involving the meticulous regulation of the gaseous composition (oxygen, carbon dioxide, and nitrogen) and environmental conditions (temperature and relative humidity) within enclosed storage facilities.CA storage slows ripening by lowering oxygen levels and increasing carbon dioxide levels, thus extending the shelf-life of various fruits and vegetables.Fruits stored in a low-O 2 atmosphere slow the ripening, but they continue to ripen when left in the air [6].Successful CA preservation of Barhi fruits was achieved at a storage temperature of 0 • C where fruits kept fresh for up to 5 months [7] and where best quality was kept within the first three months of storage.
Fruit ripening stages may be assessed using smart agriculture technologies, which might help with quality management.Frequently, methods used to evaluate fruit quality include the titrable acidity (TA), starch content, pH, soluble solid content (SSC), ratio of SSC to TA, tissue stiffness, and physical features including size, shape, color, and appearance [8].Routine measurements of physicochemical properties of foods to evaluate food quality during the whole chain from harvest to consumers are expensive and time-consuming, and mostly destructive to the samples.It is crucial for commercial management to avoid destructive tests through a quick prediction of food properties during the various stages of processing.
The food quality index (Q i ) [9,10] can describe a theoretical/empirical model developed to define product general characteristics.In research and industry applications, objective measurements are favored over sensorial tests.These technologies are more accurate, eliminate arbitrator discrepancies, and provide consumers, businesses, and academics with one standardized language [11].It is important to track the food quality attributes over time with an effective prediction model such as a Q i to assist food manufacturers and consumer acceptance.After that, additional predictions for the Q i model can be made using non-destructive testing, namely, near-infrared spectroscopy (NIR).
Using near-infrared spectroscopy (NIR) is a frequent non-destructive detection method for rapid assessment of fruit qualities [12].In several studies, researchers employed near-infrared (NIR) spectroscopy in an attempt to predict the chemical and physical characteristics of many fruits, both in their fresh state and after undergoing processing or storage [13][14][15][16].Furthermore, spectroscopy and fruit sensory evaluation have been correlated in a number of research studies [15,17,18].The integration of appropriate statistical analysis with near-infrared (NIR) spectroscopy can be deemed an effective technique for evaluating both quantifiable and qualitative aspects of food quality, including its inherent attributes and sensory characteristics.By establishing a comprehensive Q i model that incorporates VIS-NIR spectral data, the assessment of food quality can be facilitated and optimized across the entire food chain, from initial production through consumption, while simultaneously accounting for potential variations during shelf life.
The wavelength range of 300-2000 nm, which includes VIS-NIR, was used to estimate the soluble sugar concentration in apple fruits with a relatively good R 2 of 0.91-0.97[16,19,20].Cherry fruits were assessed for soluble sugar content utilizing VIS-NIR spectra at a 600-1100 nm wavelength with a standard error of prediction (SEP) of 0.75, which measures the average difference between a set of samples' predicted and actual values [21].For kiwi fruits, the physical parameters SSC and Hue angle were conducted using near-infrared estimation with an R 2 of 0.82 and 0.93, respectively [22].NIR spectroscopy was used [23] at 900-1700 nm to classify Shahani dates into four maturity phases: Kimiri, Khalal, Rutab, and Tamr, where the R 2 values for the moisture content and TSS were 0.98 and 0.96, respectively, in the predicted models.According to Gómez [24], mandarin has six broadband peaks on its absorption curve.Spectroscopic analysis performed in the NIR region reveals a significant absorption peak at 672 nm, suggesting the presence of pigments like chlorophyll.The presence of chlorophyll leads to the distinctive green color observed in the fruit.
While PLSR (partial least squares regression) is a classic linear tool in chemometrics, ANNs (artificial neural networks) offer a powerful alternative for modeling complex nonlinear relationships between input and output data.Introduced relatively recently to the field, ANNs are finding diverse applications in chemometrics, including mapping, regression, modeling, clustering, and classification [25].Notably, their ability to interpret and quantify overlapping peaks and reduce interference effects in mixed spectra makes them particularly valuable for food investigations [26].
There is a need to investigate and quantify both objective and subjective measurements of the fruit quality throughout the storage period of controlled atmospheric (CA) storage.Thus, the objective of this work was to model a Q i for Barhi fruits involving sensory and objective assessments, followed by investigating the possibility of forecasting the Q i using VIS-NIR of those properties non-destructively.This reduces the required money, time, and labor for routine work and sensory evaluation of fresh and stored products throughout the processing and market chain.

Fruit Samples Preparation and Storage
Barhi fruits, identified as having reached the Khalal maturity stage, were harvested from a date palm farm situated within the Riyadh region of Saudi Arabia.Thereafter, on the same day, the aforementioned fruits were transported to the food processing laboratory located at King Saud University.After being cleaned gently from dust with compressed air (3 bar), a total of 1000 Barhi fruits were sorted to three stages of maturation, ranging from 80 to 100% yellowish.A total of 75% of the dataset (750 fruits) was used for model training (calibration and cross-validation) while the remaining 25% (250 fruits) was utilized for testing the model performance.Barhi fruits were first divided into three groups for color (non-destructive test) followed by MC and TSS), texture, and sensory evaluation.Fruits were scanned with Flex750 for their VIS-NIR spectrum followed by the measurements of each property.
The next step was to store fresh Barhi fruits in three systems: ambient (25 • C), cold (1 • C), and CA (1 • C with 5%:5% O 2 :CO 2 , 85% RH) storage, for up to three months.Typically, during storage, Barhi fruits tend to mature from the Khalal stage (yellow) to the Rutab stage (dark brown).The aim of proper Barhi storage is to delay such ripening to avoid losing the consumers' preference when fruits become brown in color.In this study, the storage for date fruits would be terminated once the ripening to brown exceeded 50% of each batch of fruits.

Sensory Analysis
Fresh Barhi date fruits (80-100% yellowish) were sensory evaluated by thirty-six evaluators from King Saud University at the College of Food and Agricultural Sciences.To conduct the planned sensory evaluation, safety and health precautions were taken.The sensory evaluation process was accomplished using the 9-point hedonic table [27,28].The selected sensory attributes were taste, texture, color, and general acceptance, with responses ranging from 1, denoting "extremely dislike", to 9, denoting "extremely like".The fruits were examined at 5 • C right after being precooled or taken from cold stores for safety issues.
The color of the Barhi fruits was assessed using a Hunter Lab scan XE (Hunter Associates Laboratory Inc., Reston, VA, USA) and the fundamental color criteria L*, b*, and a*, where L* stands for brightness/darkness, a* stands for redness/greenness, and b* stands for blueness/yellowness.The browning index (BI) and total color difference (∆E) were derived from the L*, a*, and b* values [30] according to: where To evaluate the fruit texture, TA-hDi (Model HD_3128, Stable Micro Systems, Surrey, UK) texture analyzer was utilized.A compression cylinder (P 75) was used in the texture profile analysis test (TPA) to achieve a 5 mm deformation at 1.5 mm/s with an average diameter of 15 mm +/− 0.2.Using the resulting deformation curves of the force-time, the hardness parameter was derived [1].To estimate the moisture content (MC%), the AOAC procedure was followed, and samples were dried under vacuum (200 mmHg) for 48 h at 70 • C (D_63450-VT 6025, Heraeus Inc., Hanauer, Germany) [18].

Evaluation of the Quality Index (Q i )
The Q i , which has a range of 0 to 1, is a tool used to model and normalize the variables under study in relation to the controlled variable's minimal value.Normalizations help to ensure that the data in the Q i are compatible [31].The following formula can be implemented to normalize the parameters: where xi is defined as the normalized value of the quality parameter x, and x min and x max are the minimum and maximum values of x, respectively.Calculation of the quality index (Q i ) was according to: where n is the number of samples.Consequently, normalized sample characteristics and overall sensory acceptability data were combined in the generated Q i .

VIS-NIR Measurements
Using a portable VIS-NIR spectrometer (F-750, Firmware v_1_2_0 build 7041, Felix Inst., Camas, WA, USA) with a wavelength range from 285 to 1200 nm, and then using F-750 Software (Data Viewer, version v1 1.0.51), the data from both measurements-reference values and absorbance-were uploaded and examined.The second derivative from the reflectance curve in the range of 285-1200 nm was then obtained using another piece of software (Model Builder (version v1 1.0.105),Zeiss MMS1 VIS-NIR spectrometer, Felix Inst., Camas, WA, USA) with an interval of 3 nm used to set the system.For every fruit sample, optical shots of the F-750 were obtained prior to food measurements (sensory evaluation and objective attributes).The F-750 has a reference shutter that, while scanning with the lamp off, makes it possible to account for the ambient light and dark current in each measurement.Three scans of each sample of the spectrum were captured and then averaged.Spectra were acquired for a different group of samples at 5 • C (similar to the sensory temperature) for the same serving for the validation procedure.After the spectra were recorded, all data on the F-750 SD card were transferred to a computer for further analysis.Using Data Viewer Software, the imported data were saved in CSV format, and the spectra were pre-analyzed utilizing the Savitzky-Golay second derivative.

Statistics and Analysis
Utilizing statistical software (SAS, V. 9.2, Cary, NC, USA), all objectively measured attributes were examined.Felix F750 AppBuilder v.2.1.7 software was used to predict the performance of both calibration and cross-validation findings.Microsoft Office 365 was used to create graphs, plots, and other calculations.A total of 1000 fruits were divided into three groups; each represented a stage of ripening for the calibration test (training set).Cross-validation was used to test the model once it was built.
Partial least squares regression (PLSR) and artificial neural network (ANN) analysis tools were used to generate the models of calibration.The spectra are examined as a linear multivariate connection using the PLSR method [32].Prior to applying the multiple regression model, PLSR finds the high-dimensional vectors (latent variables, LVs) that are used to explain the data's most valuable variation.Exploring subspaces that boost predictor and response variable covariance leads to the discovery of latent variables [33].The highly developed nonlinear pattern recognition technique known as artificial neural networks (ANNs) can simulate complex biodiversity as well as instrument and environmental variability; ANNs are a prominent technology used in VIS-NIR spectroscopy as an alternative to PLS.Unlike PLS, ANNs can handle non-linearity and provide many optimization options.To detect spectral similarities, a large training dataset and discriminant-based methods were employed.Furthermore, ANNs can fit unknown spectra to numerous comparable spectra, whereas PLS can only multiply and add spectra from the calibration set.This makes ANNs more dependable when dealing with varied spectra [34].In this study, App-Builder v.2.1.7 software (Felix Instr., Camas, WA, USA) was used to examine the estimated data.Based on calibration and validation results, the ANN performance of the prediction was evaluated using the correlation coefficient (R 2 ), square error of root mean in calibration (RMSEC), and cross-validation (RMSECV) [14].RMSEC is a parameter that indicates how well the calibration model coincides with the calibration set.

Results
Based on the Barhi date characteristics, the shelf life of the fruits was objectively and subjectively evaluated, and then the Q i and VIS-NIR were used for modeling.

Sensory Evaluation
The average sensory evaluations of Barhi fruit characteristics by judges are displayed in Table 1, which shows the significant variations determined utilizing Duncan's multiplerange test (p < 0.05).Table 1 shows that the two most popular samples were 90% and 100% yellowish fruit.However, 90% yellowish dates are preferred compared to 100% yellowish dates to achieve a delay in ripening and prolong the shelf life of the stored fruits.This is because they have better texture and cohesion properties as well as crunchiness, are not susceptible to deterioration or an increase in ripeness, and do not turn into Rutab easily.Table 1 shows that the harvesting time (stage of maturity) had a significant influence (p < 0.05) for all sensory acceptance parameters in which 80% yellowish date fruits had the least liked taste, color, and overall acceptance.Therefore, the recommended 90% yellowish date fruits were selected for the shelf-life storage for up to 120 days (CA storage), 40 days (cold), and 20 days (ambient, marketing temperature) based on their physical and sensory characteristics.

Sensory Assessment of Fruits during Storage
Table 2 shows the average sensory attributes of the Barhi samples during the storage period of up to 120 days (CA storage), 40 days (cold) and 20 days (ambient conditions).The periods of storage were determined based on when 50% of the samples deteriorated.Deterioration was detected visually based on the transformation of Khalal (yellow) into Rutab (brown).During storage, the sensory scores for the qualitative attributes (taste, texture, color, and overall acceptance) for all samples decreased over time.This indicated that the Barhi fruits deteriorate with storage.At the end for each of the storage period, the color scores in CA, cold, and ambient decreased from 8.9 to 3.30, 3.45 and 3.52 while texture assessments decreased from 8.4 to 3.13, 3.06 and 3.20 where taste average scores decreased from 8.7 to 3.8, 4.05 and 3.89, respectively.Furthermore, the evaluations for "overall acceptance" decreased from 8.5 to 2.84, 3.83 and 3.70, respectively.It can be noted, however, that fruit quality was much better in CA storage compared to cold and ambient conditions for the 40-and 20-day storage periods, respectively.

Evaluation of Barhi Fruits Physical Properties during Storage
Table 3 shows the influence of storage time on the physical properties of Barhi fruits.The TSS% scores for CA, cold, and ambient (25

Modeling of Quality Index (Q i )
The Q i for Barhi evaluates the standard deviation of ten characteristics, five of which are sensorial and five of which are physical.The Barhi fruits displayed consistent and ongoing changes for all assessed parameters during the storage period, as presented in Figure 1.The Barhi fruit index of modeled quality began with a value of 0.85 and decreased to 0.38 at the end of the storage time.
The following model (with R 2 = 0.97) established a relationship of the normalized Q i and with duration of shelf-life (days).The power law model could be used to analyze a food product's sensory evaluation [35].Thus, the relationship between the quality index (Q i ) and the shelf life is as follows: Once the power function's exponent approached less than 1.0, the overall acceptance exhibited a downward curve in relation to the normalized Q i and rose more slowly as the Q i increased.
It can be stated that the Q i aided in providing a reference for the actual shelf life of Barhi fruits.Furthermore, authorities may utilize Q i as a powerful tool to evaluate and The following model (with R 2 = 0.97) established a relationship of the normalized Qi and with duration of shelf-life (days).The power law model could be used to analyze a food product's sensory evaluation [35].Thus, the relationship between the quality index (Qi) and the shelf life is as follows: Qi = 0.87e −0.01 Days (6) Once the power function's exponent approached less than 1.0, the overall acceptance exhibited a downward curve in relation to the normalized Qi and rose more slowly as the Qi increased.
It can be stated that the Qi aided in providing a reference for the actual shelf life of Barhi fruits.Furthermore, authorities may utilize Qi as a powerful tool to evaluate and determine the actual quality during the shelf life of Barhi fruits throughout the production, transportation, storage, and retail chain with tolerable precision.

Quality Index (Qi) Modeling with VIS-NIR Spectra
VIS-NIR technology has recently acquired popularity in food applications for linking the spectrophotometer wave absorbance and reflectance with the physiochemical characteristics of fruit ingredients.To gain superior performance and powerful models, VIS-NIR spectrum data must be pre-processed.These derivatives can be quite beneficial in the near-infrared spectrum to eliminate some improper signals from the spectrum [36].The second derivative of VIS-NIR spectra reflectance was obtained in this work).Figure 2 shows the spectra absorbance for Barhi dates (1000 fruits) for the different levels of fruit maturity (from 80 to 100% yellowish).

Quality Index (Q i ) Modeling with VIS-NIR Spectra
VIS-NIR technology has recently acquired popularity in food applications for linking the spectrophotometer wave absorbance and reflectance with the physiochemical characteristics of fruit ingredients.To gain superior performance and powerful models, VIS-NIR spectrum data must be pre-processed.These derivatives can be quite beneficial in the near-infrared spectrum to eliminate some improper signals from the spectrum [36].The second derivative of VIS-NIR spectra reflectance was obtained in this work).Figure 2 shows the spectra absorbance for Barhi dates (1000 fruits) for the different levels of fruit maturity (from 80 to 100% yellowish).The following model (with R 2 = 0.97) established a relationship of the normalized Qi and with duration of shelf-life (days).The power law model could be used to analyze a food product's sensory evaluation [35].Thus, the relationship between the quality index (Qi) and the shelf life is as follows: Qi = 0.87e −0.01 Days (6) Once the power function's exponent approached less than 1.0, the overall acceptance exhibited a downward curve in relation to the normalized Qi and rose more slowly as the Qi increased.
It can be stated that the Qi aided in providing a reference for the actual shelf life of Barhi fruits.Furthermore, authorities may utilize Qi as a powerful tool to evaluate and determine the actual quality during the shelf life of Barhi fruits throughout the production, transportation, storage, and retail chain with tolerable precision.

Quality Index (Qi) Modeling with VIS-NIR Spectra
VIS-NIR technology has recently acquired popularity in food applications for linking the spectrophotometer wave absorbance and reflectance with the physiochemical characteristics of fruit ingredients.To gain superior performance and powerful models, VIS-NIR spectrum data must be pre-processed.These derivatives can be quite beneficial in the near-infrared spectrum to eliminate some improper signals from the spectrum [36].The second derivative of VIS-NIR spectra reflectance was obtained in this work).Figure 2 shows the spectra absorbance for Barhi dates (1000 fruits) for the different levels of fruit maturity (from 80 to 100% yellowish).The spectrum reflectance was typically in the visible region (from 475 to 650 nm) [37].Figure 3 depicts the spectra (reflectance (R), %) with the longest storage span being 120 days; Figure 4 shows the average second derivative of Barhi fruit spectra reflectance at different storage periods along the storage span of 120 days.These figures demonstrate the effect of the storage period on the reflectance and second derivative curves at a wavelength 350 to 1100.
Foods 2024, 13, 345 9 of 16 days; Figure 4 shows the average second derivative of Barhi fruit spectra reflectance at different storage periods along the storage span of 120 days.These figures demonstrate the effect of the storage period on the reflectance and second derivative curves at a wavelength 350 to 1100.
VIS-NIR spectra will be further analyzed utilizing two powerful tools, namely PLSR and ANN, and will then be tested for its performance for the quality of Barhi fruits (objective analysis) compared with Qi.  different storage periods along the storage span of 120 days.These figures demonstrate the effect of the storage period on the reflectance and second derivative curves at a wavelength 350 to 1100.VIS-NIR spectra will be further analyzed utilizing two powerful tools, namely PLSR and ANN, and will then be tested for its performance for the quality of Barhi fruits (objective analysis) compared with Qi.VIS-NIR spectra will be further analyzed utilizing two powerful tools, namely PLSR and ANN, and will then be tested for its performance for the quality of Barhi fruits (objective analysis) compared with Q i .

Partial Least Squares Regression (PLSR)
Table 4 presents calibration analysis and the cross-validation of PLSR for the Barhi fruits physical properties of TSS%, ∆E, BI, hardness (N), and MC% as well as Q i characteristics.In the calibration models, R 2 and RMSEC (mmd −1 ) were 0.979 and 0.659 for TSS%, 0.961 and 0.994 for ∆E, 0.881 and 0.978 for BI, 0.903 and 0.708 for hardness (N), 0.902, 2.119 for MC%, and 0.793 and 0.110 for Q i , respectively.In cross-validation analysis, R 2 and RMSECV were 0.910 and 0.758 for TSS%, 0.912 and 0.979 for ∆E, 0.882 and 0.902 for BI, 0.893 and 0.777 for hardness (N), 0.901 and 1.921 for MC%, and 0.783 and 0.298 for Q i , respectively.The coefficient of correlation (R 2 ) data was in a range between 0.793 and 0.979.Such a range proves the high performance of the model, with an R 2 greater than 0.70 regarded as satisfactory in NIR models [38,39].This implies that the PLSR analysis is an effective statistical means for predicting both Q i and objective Barhi fruit quality indicators.

Artificial Neural Networks Analysis (ANN)
The performance analysis of ANN for each calibration and cross-validation of the Barhi fruit characteristics is shown in Table 5.In the calibration models, R 2 and RMSEC were 0.981 and 0.857 for TSS%, 0.950 and 1.093 for ∆E, 0.891 and 0.681 for BI, 0.891 and 0.747 for hardness (N), 0.901 and 1.82 for MC%, and 0.912 and 0.308 for Q i , respectively.Moreover, regarding the cross-validation performance, R 2 and RMSECV were 0.979 and 0.705 for TSS%, 0.949 and 0.989 for ∆E, 0.889 and 0.605 for BI, 0.893 and 0.708 for hardness (N), 0.901 and 1.129 for MC%, and 0.912 and 0.308 for Q i , respectively.The results showed that the ANN analysis is a powerful tool for the estimation of Barhi date properties.It is interesting to note that compared to the PLSR model, the ANN model is typically better suited for predicting Barhi characteristics, as shown by the higher correlation coefficients of the ANN analysis.With the increased number of components, RMSEC decreases.RMSECV, on the other hand, grows as more components are included.Compared to RMSEC, RMSECV is a more accurate predictor of future model performance [17].Therefore, in terms of calibration and cross-validation, the two analysis methods (PLSR and ANN) can be useful tools for modeling VIS-NIR data.

Performance of Prediction Models of Barhi Quality during Storage
As indicated above, excellent model performance is achieved with R 2 values greater than 0.70, in which values ranging from 0.50 to 0.69 indicated a fair model performance [40].Figure 5 shows a comparison of sensorial data given by Q i and objective TPA hardness tests.Both tests' curves showed a similar trend in a decrease with storage time.This indicates that a link between the sensory and objective measurements utilizing Q i and VIS-NIR spectra can be implemented in the industrial automation process of quality assurance.
With the increased number of components, RMSEC decreases.RMSECV, on the othe hand, grows as more components are included.Compared to RMSEC, RMSECV is a mor accurate predictor of future model performance [17].Therefore, in terms of calibration and cross-validation, the two analysis methods (PLSR and ANN) can be useful tools fo modeling VIS-NIR data.

Performance of Prediction Models of Barhi Quality during Storage
As indicated above, excellent model performance is achieved with R 2 values greate than 0.70, in which values ranging from 0.50 to 0.69 indicated a fair model performanc [40].Figure 5 shows a comparison of sensorial data given by Qi and objective TPA hard ness tests.Both tests' curves showed a similar trend in a decrease with storage time.Thi indicates that a link between the sensory and objective measurements utilizing Qi and VIS NIR spectra can be implemented in the industrial automation process of quality assur ance.Figure 6a shows the predicted Qi and measured objective hardness.The correlation between these parameters was particularly good with a correlation coefficient of R 2 o 0.902.Figure 6b shows a good relationship between sensorial and objective texture (hard ness estimation) with a correlation coefficient of R 2 = 0.850.
Figure 6c shows the relationship between VIS-NIR estimation and measured objec tive hardness with a correlation coefficient R 2 = 0.905.This result proves how well VIS NIR spectroscopy can correlate with textural measurements of Barhi fruits at differen stages of maturity.Figure 6a shows the predicted Q i and measured objective hardness.The correlation between these parameters was particularly good with a correlation coefficient of R 2 of 0.902.Figure 6b shows a good relationship between sensorial and objective texture (hardness estimation) with a correlation coefficient of R 2 = 0.850.
Figure 6c shows the relationship between VIS-NIR estimation and measured objective hardness with a correlation coefficient R 2 = 0.905.This result proves how well VIS-NIR spectroscopy can correlate with textural measurements of Barhi fruits at different stages of maturity.

Discussion
According to the samples' sensory analysis results, the acceptability of the arbitrator increases with fruit maturation.This is consistent with an increase in fruit maturity effec on sweetness (and, consequently, taste).These results agree with earlier studies on th influence of the harvesting stage on the storage duration of Barhi fruits [41] with range of 60 to 80% MC and 20 to 35% TSS, and yellow to green color based on sensory estimation which affect consumer acceptance of Barhi fruits during the maturation process.
Preservation in CA storage achieved the longest shelf-life compared to cold and am R² = 0.9029

Discussion
According to the samples' sensory analysis results, the acceptability of the arbitrators increases with fruit maturation.This is consistent with an increase in fruit maturity effect on sweetness (and, consequently, taste).These results agree with earlier studies on the influence of the harvesting stage on the storage duration of Barhi fruits [41] with ranges of 60 to 80% MC and 20 to 35% TSS, and yellow to green color based on sensory estimation, which affect consumer acceptance of Barhi fruits during the maturation process.
Preservation in CA storage achieved the longest shelf-life compared to cold and ambient storage based on Barhi fruit sensory assessment; CA storage could delay the deterioration up to 120 days.In an ambient environment, the samples had the shorted shelf-life.This could be attributed to the accelerated enzyme activities and texture softening at room temperature, which affect Barhi fruit quality during such storage [18].
The increase in TSS of fruits throughout the storage period is probably due to the loss of moisture and more polysaccharides being enzymatically converted to simple sugars [42].The observed color variations and alterations may be related to differences in the enzymatic oxidation of phenolic chemicals.The cell structure of date flesh changes due to dehydration during storage and thus increases enzymatic oxidation of phenolic compounds [43].Several studies [43][44][45] showed comparable results to this study.The reduction in hardness during storage may be related to cellular disintegration, which causes membrane porosity, or to the conversion of insoluble particles into soluble solids [46].
Regarding the VIS-NIR cross-validation performance, the R 2 values were higher than 0.79, which indicates strong model performance, in which an R 2 greater than 0.70 was regarded as satisfactory in VIS-NIR models [38,39].The ANN model's correlation coefficients are clearly greater than that of the PLSR model, especially when considering the normalized Q i parameter.Therefore, it is advised that Q i estimation would be dependent on the ANN technique (R 2 = 0.891-0.981)rather than the PLSR technique (R 2 = 0.792-0.979).
The quality index (Q i ) of sensory and physical attributes simplified the assessment and comparison of product qualities, utilizing a non-destructive and simple VIS-NIR technique.As a result of the analyses in this work, VIS-NIR interrelated well with Q i and, hence, with the Barhi fruit's unique features.In general, Q i can predict the fruit quality throughout the storage duration of Barhi dates and set by standard authorities [47].Thus, the portable VIS-NIR spectra meter can be a helpful tool in the field for producers, manufacturers, storage, transportation, market, authorities, and throughout the entire chain to confirm the "quality" and "shelf life" of the commodities.The findings of this study indicate the feasibility of correlating non-destructive parameters (Q i and VIS-NIR) with sensory estimation and texture parameters (hardness, N) of Barhi samples at any point during the storage time.This can be utilized in commercial online fruit sorting instrumentation using VIS-NIR instrumentation and the Q i to predict the texture of fruit non-destructively.
Furthermore, this suggests that automated sorting of Barhi dates non-destructively based on fruit firmness is applicable using near-infrared spectroscopy.This can be utilized in the targeted markets; for example, fruit that is less mature and has a relatively hard texture might be assigned to long-distance/international markets, while relatively mature (mild texture) fruits may be assigned to intermediate-distance markets and soft fruits can be reserved for immediate marketing in regional/local stores.Moreover, based on VIS-NIR meters within the sorting line, fruits can be sorted automatically based on their "sweetness" and "moisture".Additionally, VIS-NIR meters can be installed within fruit storage facilities to detect the quality and shelf life of fruits stored for weeks or months.
In essence, artificial intelligence (AI) can be integrated with near-infrared (VIS-NIR) spectroscopy to revolutionize fruit quality assessment.This powerful combination can predict ripeness, detect internal defects, and identify specific cultivars, enabling real-time monitoring and decision making throughout the food chain and optimizing postharvest management and processing for improved fruit quality with the highest possible efficiency.

Conclusions
The generated Barhi quality index (Q i ) in this study provides an approximate estimation of fruit quality during its storage duration.This approach provides a quick, nondestructive, and reliable method for evaluating quality that is simple to apply across the entire chain of processing, storage, and marketing chains.The VIS-NIR analysis correlated the absorbance and reflectance of spectrophotometer waves to the physical characteristics of food products.During the shelf life, both sensory and objective measurements can be followed and evaluated with the quality index (Q i ) and immediately measured using a VIS-NIR analyzer.Both (PLSR) partial least-square regression and (ANN) artificial neural network analyses were helpful to examine VIS-NIR validity.
VIS-NIR successfully predicted the Q i and fits well with normalized measured sample properties (total soluble solids (TSS), color (∆E and Bi), texture (hardness), and moisture content (MC%)) and sensory evaluation during the shelf-life period.VIS-NIR spectroscopy was helpful in estimating the Q i of Barhi fruits in calibration and cross-validation with an R 2 range of 0.891-0.981.
In conclusion, VIS-NIR spectrophotometry can predict Q i non-destructively and can thus be used successfully by authorities, product manufacturers, processors, and throughout the entire production, processing, transport, preservation, and retail market chain to assess the "quality" along the "shelf life" of the commodity.Institutional Review Board Statement: King Saud University IRB statement: "Thank you for submitting your proposal to the King Saud University Institutional Review Board (IRB).IRB statement: Your proposal was evaluated in light of the KSU IRB policy and national regulations that govern the protection of human subjects in research, and concludes that your research project and its procedure does not pose 'more than minimal risk to the human participants' and that it falls in the category of 'Non-Human Subject Research'".Approval #: Ref. No. 23

Figure 1 .
Figure 1.Normalized Q i of Barhi fruits during controlled atmospheric storage.

Figure 1 .
Figure 1.Normalized Qi of Barhi fruits during controlled atmospheric storage.

Figure 2 .Figure 2 .
Figure 2. Spectra absorbance view of 1000 samples of Barhi dates at the different maturity levels utilizing the Flex F750 instrument.

Figure 3 .
Figure 3. Reflectance spectra (%) at different storage periods in CA storage from fresh (0 days) to 120 days (n = 35 fruits for each storage period).

Figure 4 .Figure 3 .
Figure 4.The second derivative reflectance mean of 250 Barhi date fruits at different storage periods from fresh (0 days) to 120 days.

Figure 3 .
Figure 3. Reflectance spectra (%) at different storage periods in CA storage from fresh (0 days) to 120 days (n = 35 fruits for each storage period).

Figure 4 .
Figure 4.The second derivative reflectance mean of 250 Barhi date fruits at different storage periods from fresh (0 days) to 120 days.

Figure 4 .
Figure 4.The second derivative reflectance mean of 250 Barhi date fruits at different storage periods from fresh (0 days) to 120 days.

Figure 6 .
Figure 6.(a) Quality index Q i and measured hardness, (b) sensory texture and measured hardness, and (c) relationship between hardness estimated using VIS-NIR with ANN and measured hardness (N).hardness × 1/11.76Q i : quality index × 10 (n = 35 fruits for each storage period).

Funding:
The Deputyship for Research and Innovation, Ministry of Education in Saudi Arabia for funding this research (#IFK-SURC-1-5623).

Table 1 .
Sensorial analysis of fresh Barhi fruits at several maturity levels * (n = 333 fruits for each ripening stage of maturity).
* Average values within a column with same letters are not significantly different at p < 0.05.

Table 2 .
Variance analysis for the effect of storage period on the sensory assessment of Barhi fruits * , ** (n = 36 fruits for each storage period/condition).
• C) increased from 20.31 to 24.12, 23.39, and 25.03%, respectively, at the end of storage, which reflects the loss of moisture during storage.∆E increased from 0 (control, fresh fruit) to 11.68, 11.28, and 12.16 where the average BI increased from 83.31 to 89.45, 91.45, and 89.76, for CA, cold, and ambient storage, respectively.Furthermore, the hardness decreased from 99.81 to 73.59, 76.85, and 52.29 N where MC% decreased from 70.99 to 62.64, 62.58, and 60.91% for CA, cold, and ambient storage, respectively.This reflects the gradual deterioration of fruits during storage but at different rates based on storage conditions. score

Table 3 .
Variance analysis for the influence of storage duration on the objective characteristics of Barhi fruits * , **. (n = 12 fruits for each measurement during various storage periods and conditions).
* Average values within a column of a group with same letters are not significantly different at p < 0.05.** (N/A): not applicable due to fruit conversion from Khala (yellow) to Rutab (brown) (50% or more).

Table 4 .
Performance of PLSR for Barhi fruits for both calibration and cross-validation models for TSS%, ∆E, BI, hardness (N), MC%, and Q i (n = 187 fruits for each property).

Table 5 .
The model performance of ANNs for both calibration and cross-validation for ∆E, TSS, BI, hardness, MC, and Q i of Barhi fruits (n = 187 fruits for each property).
/0867/IRB.The Exemption Letter for Research (Food Technology Testing) Project No. E-23-8335 letter is available.
Informed Consent Statement: Not applicable.