Assessment of Maturity of Plum Samples Using Fourier Transform Near-Infrared Technique Combined with Chemometric Methods

The FT-NIR technique was used for rapid and non-destructive determination of plum ripeness. The dry matter (DM), titratable acidity (TA), total soluble solids (TSS) and calculated maturity index (MI: TSS/TA) were used as reference values. The PLS correlations were validated via five-fold cross-validation (RMSECV for different parameters: DM: 0.66%, w/w; TA = 0.07%, w/w; TSS = 0.72%, w/w; MI = 1.39) and test set validation (RMSEP for different parameters: DM: 0.65%, w/w TA = 0.07%, w/w; TSS = 0.61%, w/w; MI = 1.50). Different classification algorithms were performed for TA, TSS and MI. Linear, quadratic and Mahalanobis discriminant analysis (LDA, QDA, MDA) were found to be the best sample detection methods. The accuracy of the classification methods was 100% for all investigated parameters and cultivars.


Introduction
Plum has been cultivated for about 5000 years, as a stone fruit with a wide range of uses and high nutritional value.Several plum species exist in different areas of the planet, such as American (Prunus nigra, Prunus americana), Chinese (Prunus simonii) and Japanese (Prunus salicina) species [1].The climatic conditions in Hungary are favorable for the cultivation of the most common varieties of European plum (Prunus domestica L.), which has high ecological tolerance.Succulent, fleshy and juicy plums are low in calories and saturated fats, but rich in vitamin C, K and A, minerals (magnesium, potassium, calcium, etc.) and other various biogenic components, such as anthocyanins and polyphenol-type compounds that contribute to preservation of human health (Table 1) [2][3][4].

Components
Amount  It is well known that nutritional properties of fruit (dry matter content, sugar content, acidity, pH, polyphenol profile, antioxidant capacity, etc.) change during the ripening process, so monitoring these components can be used to estimate their ripeness.
The changes in the concentrations of typical phenolic components (epicatechin, catechin, B2, neochlorogenic acid and chlorogenic acid and other typical phenolic acids, such as gallic acid and caffeic acid) depending on the harvest time of Prunus salicina fruits were investigated by Cabrera-Bañegil et al. [5] based on the excitation-emission spectra of the samples.Parallel factor analysis (PARAFAC) and unfolded partial least-squares (U-PLS) data processing were applied to quantify the polyphenol compounds.It was concluded that the fluorescence spectra do not allow separate determination of epicatechin and catechin, nor neochlorogenic acid and chlorogenic acid.The prediction models were suitable for quantification of the components and the results obtained were in agreement with the values determined via high-performance liquid chromatography with fluorescence detection (HPLC-FLD).However, it was observed that the total amount of catechin and epicatechin and chlorogenic and neochlorogenic acids decreased with maturation.Using the same measurement and data processing technique, Monago-Maraña et al. [6] found that the chlorophyll content of plums can be a good indicator of the ripening process.Based on their results, fluorescence fingerprint combined with second-order calibrations is suitable for monitoring chlorophyll content in plum fruit.Fluorescence spectroscopy combined with chemometric analysis was used by Monago-Maraña et al. [7] to distinguish Japanese 'Angeleno' plum cultivars according to harvest date.Based on the polyphenol content, the classification models predicted the stage of maturity with acceptable accuracy.In addition, the calibration models obtained with partial least-square (PLS) regression also gave good results for the individual quantification of polyphenols like neochlorogenic acid and epicatechin.
In another study on this topic [8], changes in total soluble solids content (TSS) and firmness during the storage of plum samples were investigated, and classification for varietal identification was performed with a hand-held near-infrared (NIR) instrument using partial least-squares discriminant analysis (PLS-DA) evaluation.Two different measurement techniques were used by the authors, a handheld micro-electro-mechanical system spectrophotometer-MEMS-and a diode-array Vis-NIR spectrophotometer.Since the measurement range of the two instruments is different (1600-2400 nm for the former and 515-1650 nm for the latter) and relatively narrow, the obtained prediction models were not very good.The root mean square error of cross-validation (RMSECV) for TSS determination was 1.11% in the case of Vis-NIR and 1.39% in the case of MEMS (the measurement range was 8. 30 measuring range was 1.93-16.12)were found using these two measurement techniques, respectively [8,9].
Louw and co-workers [10] used Fourier transform near-infrared (FT-NIR) reflectance spectroscopy to develop a multivariate prediction model for the TSS, total titratable acidity (TA), sugar-to-acid ratio (TSS/TA), hardness and weight of three South African plum cultivars.The measurements were carried out for two years during 7 weeks of the ripening period with mixed validation results.It was found that among the parameters studied, the TSS models had the best statistical characteristics.However, it was observed that the statistical performance of the models also varied depending on the variety, with better predictive models obtained for the varieties 'Pioneer' and 'Laetitia' than for 'Angeleno'.The best model was found to predict TSS (for the varieties 'Pioneer' and 'Laetitia') (square of coefficient of determination for the cross-validation or test set validation: Q 2 = 0.817-0.959;RMSEP = 0.453-0.610%,Brix).The reliability of the results is supported by the very large number of samples (n > 1000) and the fact that the sample was taken over two years.The FT-NIR technique was applied by Costa et al. [11] to study Prunus salicina, L. and Prunus domestica samples (48 samples) for TSS determination (5-15%) and pH (2.72-3.84)using different variable selection procedures (interval partial leastsquares regression-iPLS, genetic algorithm-GA, successive projection algorithm-SPA and ordered predictor selection-OPS).Spectra were recorded from five different points of the samples using a diffuse reflectance measurement setup.For TSS, PLS regression without variable selection has the most favorable statistical properties, with a root mean square error of prediction (RMSEP) of 0.45%.For pH, PLS-GA has the most favorable RMSEP (0.07).
According to another publication, the diffuse reflectance NIR method was used for the non-destructive examination of the browning of fruit flesh during storage.During the qualitative tests, the Mahalanobis distances discriminate analysis (DA) and the backpropagationartificial neural networks (BP-ANN) were used to detect brown and non-brown flesh.Using the BP-ANN method, 100% accuracy was achieved for brown and non-brown samples [12].
The changes in TSS, TA, pH, firmness, TSS/TA and flesh color (L*, a*, b*) parameters of 'Friar' plums (Prunus domestica, Friar) during cold storage were investigated by Li et al. [13].Measurements were performed for 28 days in the wavelength range 638-986 nm using the Vis/NIR technique.Among the investigated parameters, a highly favorable statistical correlation was obtained only for TSS (Q 2 = 0.9456, RMSEP = 0.456).
The sugar profile of the juice of Prunus domestica plum varieties 'Vânăt de Italia', 'Stanley' and 'Tuleu Gras' was investigated by Vlaic et al. [14] during the ripening process.Samples of different maturity stages were measured using the Fourier transform midinfrared (FT-MIR) technique.It was found that during the ripening process, the fructose level of the samples varied between 0.26 and 3.73%, the glucose level between 1.43 and 1.10% and the sucrose content between 0.01 and 10.19%.The best estimation result, as expected given the concentrations, was obtained for sucrose (Q 2 = 0.97; RMSEP = 0.57).
Point spectroscopy offers an interesting way to monitor the ripening process of fruits and vegetables.It provides the sum signals of attenuation, i.e., absorption and scattering.The scattering properties of a tissue influence the detected signal.However, in the case of European plums, the scattering rate varies during the fruit's growth.Consequently, the apparent absorption changes, which upsets the relationship between apparent absorption and the attributes under investigation, so this method is not recommended for plum samples [15].
The NIR technique does not only allow the estimation of well-known quality parameters.In combination with appropriate chemometric techniques, it can also be used to detect Monilinia fructigena infection.Using independent linear discriminant analysis (LDA) prediction, plum samples not yet showing signs of M. fructigena infection can be clearly identified based on their spectral characteristics [16].
For fruit quality control, shape, size, skin color and general appearance are the basic external quality parameters while TSS, TA, TSS/TA, pH, starch and sugar content, carotenoids, sugar, ascorbic acid, total flavonoids, total phenolic, antioxidant activity and flesh firmness are indicators of internal quality properties [17].
The aim of our research was to develop a fast and non-destructive method for determining the maturity state of plum samples based on the most obvious quality parameters (TSS, TA, TSS/TA and pH).
We further aimed to develop classification models by evaluating reference data and varieties using different chemometric techniques.These models can be used for direct monitoring of fruit ripeness to quickly select the right quality and variety at the processing site.

Materials
Investigations were carried out on the two most typical varieties of the Szabolcs-Szatmár-Bereg region of Hungary, namely, Prunus domestica cv.'Elena' (38 samples, marked E) and Prunus domestica cv.'Stanley' (30 samples, marked S) (Figure 1) [18,19].The 'Stanley' cultivar ripens at the end of August with a dark blue and very ash skin.They are colored early, so the color is not an objective parameter for maturity.It is suitable for consumption or processing only when fully ripened.The 'Elena' cultivar ripens at the end of September.Its color and bloom are similar to those of the 'Stanley' cultivar; it is a very sweet and aromatic fruit.It has a higher average sugar content than the 'Stanley' cultivar.The ripening stages of these two varieties were studied over two years (2021-2022).In 2021, the samples (both varieties) were harvested in mid-August and early September, and in 2022 in late August and mid-September.Immature and mature samples of both varieties were tested.
For fruit quality control, shape, size, skin color and general appearance are the basic external quality parameters while TSS, TA, TSS/TA, pH, starch and sugar content, carotenoids, sugar, ascorbic acid, total flavonoids, total phenolic, antioxidant activity and flesh firmness are indicators of internal quality properties [17].
The aim of our research was to develop a fast and non-destructive method for determining the maturity state of plum samples based on the most obvious quality parameters (TSS, TA, TSS/TA and pH).
We further aimed to develop classification models by evaluating reference data and varieties using different chemometric techniques.These models can be used for direct monitoring of fruit ripeness to quickly select the right quality and variety at the processing site.

Materials
Investigations were carried out on the two most typical varieties of the Szabolcs-Szatmár-Bereg region of Hungary, namely, Prunus domestica cv.'Elena' (38 samples, marked E) and Prunus domestica cv.'Stanley' (30 samples, marked S) (Figure 1) [18,19].The 'Stanley' cultivar ripens at the end of August with a dark blue and very ash skin.They are colored early, so the color is not an objective parameter for maturity.It is suitable for consumption or processing only when fully ripened.The 'Elena' cultivar ripens at the end of September.Its color and bloom are similar to those of the 'Stanley' cultivar; it is a very sweet and aromatic fruit.It has a higher average sugar content than the 'Stanley' cultivar.The ripening stages of these two varieties were studied over two years (2021-2022).In 2021, the samples (both varieties) were harvested in mid-August and early September, and in 2022 in late August and mid-September.Immature and mature samples of both varieties were tested.

Methods
The dry matter content (DM), titratable acidity (expressed as malic acid) (TA), total soluble solids content (Brix • ) (TSS), pH and the maturity index calculated from the sugar/acid ratio (MI = TSS/TA) were determined to determine the ripening stage.Three parallel measurements were made for each parameter.

Reference Methods
The reference methods have already been described in detail in our previous work [20].

FT-NIR Measurements
The FT-NIR spectra were recorded, and the data were processed using a Bruker MPA FT-NIR instrument (BRUKER, Ettlingen, Germany).The diffuse reflectance spectra were recorded with a resolution of 16 cm −1 , and the final spectral image was obtained by averaging 32 sub-spectra.
A rotating quartz sample holder (Ø 85 mm) was used to provide the largest possible surface area.Spectra were taken from the original fruit sample; no sample preparation was applied.Five spectra were recorded for each sample.The evaluation was performed using the average of the parallel spectra [20].

Chemometric Methods Principal Component Analysis-PCA
PCA is an unsupervised pattern recognition technique.Several algorithms, including Singular Value Decomposition (SVD) and NIPALS, can be used to find the principal components.The major practical difference between the two methods is that, unlike for NIPALS, in SVD, the scores are scaled so that the sum of squares of the scores of each component is equal [21].

Partial Least-Squares Regression-PLSR
The most important metrics of the PLSR model are the coefficient of determination (R 2 for calibration, Q 2 for validation), the root mean square error (RMSECV for cross-validation and RMSEP for test validation), the number of the latent variables (PLS factors), the value of the residual prediction deviation (RPD) and the bias.The calculation of these parameters is based on the following mathematical relationships: where RMSECV or RMSEP: root mean square error of cross-validation or test validation (the unit of measurement is the same as that of the estimated parameter); y m i : measured (reference) value of the ith component; y  During model building, the main objective is to ensure that the characteristic parameters take the optimal value.This means that R 2 and Q 2 should be as close to 1 as possible, and that RMSECV and RMSEP and the associated bias (which should be no more than one-tenth of the mean squared error) should be as low as possible.Residual prediction deviation (RPD) is a model-specific quality parameter calculated from R 2 and Q 2 , but as it is not an independent datum, not everyone uses it.Nevertheless, experience shows that this parameter helps to qualify the model.If the RPD > 3 (this means Q 2 > 0.89), the model is considered excellent for quantitative evaluation [22,23].
The maximum number of PLS factors was set to ten depending on the number of samples tested to avoid the under-or overfitting.
Data preprocessing was performed in order to reduce variations in the spectral data (e.g., variations due to sample thickness and light scattering) using the following methods: straight-line subtraction (SLS) standard normal variate (SNV), multiplicative scatter correction (MSC), derivatives (first and second derivative, FD and SD) or a combination of SLS, SNV and MSC with FD or SD algorithms [24][25][26].
The PLSR models were validated through random three-fold cross-validation and test set validation.For the latter, the dataset was split in a 70:30 ratio (48 samples for the training set, 20 samples for the test set).The training and test samples were randomly selected.However, the allocation of the samples also took into account that both datasets should cover the full range of measurement parameters.

Classification Models
Different supervised learning algorithms were performed (discriminant analysis; decision trees; nearest-neighbor method; multilayer perceptron neural network, naïve Bayes; partial least-squares discriminant analysis; random forest; support vector machine) using spectral data with different classification criteria based on maturity of the sample.All models were validated using a random five-fold cross-validation procedure [27].
The model performance was evaluated based on commonly used classification metrics, such as sensitivity, specificity, precision and accuracy.These were calculated based on the number of true-positive (T P ), true-negative (T N ), false-positive (F P ) and false-negative (F N ) values, correctly classified results N CORR and total results N TOT using the following equations [28,29]: Accuracy = N CORR N TOT (7)

Reference Data
The measurement results provided by the reference methods and the reference data available in the literature are summarized in Table 2.The measurement results refer to fresh fruit in all cases.

NIR Spectra Analysis
In comparing the spectra of the two cultivars, characteristic differences can be seen in the raw spectra (Figure 2) in the 5000-3800 cm −1 wavenumber range.A vibrational transition of the bonds and functional groups of sugars and organic acids can be detected in this range.

NIR Spectra Analysis
In comparing the spectra of the two cultivars, characteristic differences can be seen in the raw spectra (Figure 2) in the 5000-3800 cm −1 wavenumber range.A vibrational transition of the bonds and functional groups of sugars and organic acids can be detected in this range.The signal from surface scattering (wax layer) and surface inhomogeneity can be eliminated via spectra derivation.Therefore, a qualitative comparison of the spectra on the first or second derivatives is appropriate.The difference in the 12,500-11,000 cm −1 range is related to the color of the samples and therefore should be ignored.Differences between the first-derivative spectra of cultivars can be observed in several wavenumber ranges (Figure 2).The difference observed in the range of 5000-3800 cm −1 of the raw spectra is even more evident in the first-derivative spectra.Furthermore, a peak shift in the 6500-5500 cm −1 region can be observed, which is related to the fiber content and refers to the different quality of the fiber [35,36].
The vibrational regions of the important parameters for the mature state-DM, TA and TSS-are marked in different colors in Figure 2 [37].The signal from surface scattering (wax layer) and surface inhomogeneity can be eliminated via spectra derivation.Therefore, a qualitative comparison of the spectra on the first or second derivatives is appropriate.The difference in the 12,500-11,000 cm −1 range is related to the color of the samples and therefore should be ignored.Differences between the first-derivative spectra of cultivars can be observed in several wavenumber ranges (Figure 2).The difference observed in the range of 5000-3800 cm −1 of the raw spectra is even more evident in the first-derivative spectra.Furthermore, a peak shift in the 6500-5500 cm −1 region can be observed, which is related to the fiber content and refers to the different quality of the fiber [35,36].
The vibrational regions of the important parameters for the mature state-DM, TA and TSS-are marked in different colors in Figure 2 [37].

Chemometric Assessment
Chemometric assessment-including PCA, PLS and classification methods-were performed using Unscrambler 10.4 and the Classification Learner application of Matlab software.

Principal Component Analysis-PCA Spectral Data
PCA was performed using the SVD algorithm with 10 principal components to cover the variability of the samples.
A five-fold random validation was used as a control.
The following criteria were set in the PCA algorithm: the ratio of calibrated to validated residual variances should be 0.5, the ratio of validated to calibrated residual variance should be 0.75, and the residual variance increase limit should be 6%.
It can be concluded that based on the residual variance (Figure 3), the first three principal components explain the majority of the variance of the traits (98%).

Chemometric Assessment
Chemometric assessment-including PCA, PLS and classification m performed using Unscrambler 10.4 and the Classification Learner applicat software.

Principal Component Analysis-PCA Spectral Data
PCA was performed using the SVD algorithm with 10 principal compo the variability of the samples.
A five-fold random validation was used as a control.The following criteria were set in the PCA algorithm: the ratio of calib dated residual variances should be 0.5, the ratio of validated to calibrated ance should be 0.75, and the residual variance increase limit should be 6%.
It can be concluded that based on the residual variance (Figure 3), the fi cipal components explain the majority of the variance of the traits (98%).In examining the three principal components, it can be seen there are s that fall outside the 95% confidence interval (ellipse) (Figure 4a,b).In examining the three principal components, it can be seen there are some samples that fall outside the 95% confidence interval (ellipse) (Figure 4a,b).
To determine whether these samples are indeed spectral outliers, the F residual and Hotelling's T 2 relationship need to be examined (Figure 5).Hotelling's T 2 statistic describes the distance from the model center to the principal components.
It was observed that samples with high F residuals but low Hotelling's T 2 , i.e., samples lying in region B of the plot, are poorly described by the model (samples E36, E38 and S21).Since high residual variance is associated with less important spectral regions, these samples need not be excluded from the model.
Samples with high Hotelling's T 2 but low F residuals, i.e., samples lying in region C of the plot, are well described by the model (sample S16).However, such samples may be influential to the model.The classic outlier samples, which are located in region D, have high F residuals and high Hotelling's T 2 and influence the model.In our case, there were no such samples.To determine whether these samples are indeed spectral outliers, the F residual and Hotelling's T 2 relationship need to be examined (Figure 5).Hotelling's T 2 statistic describes the distance from the model center to the principal components.It was observed that samples with high F residuals but low Hotelling's T 2 , i. ples lying in region B of the plot, are poorly described by the model (samples E36, E S21).Since high residual variance is associated with less important spectral region samples need not be excluded from the model.
Samples with high Hotelling's T 2 but low F residuals, i.e., samples lying in re of the plot, are well described by the model (sample S16).However, such samples influential to the model.
The classic outlier samples, which are located in region D, have high F residu high Hotelling's T 2 and influence the model.In our case, there were no such samp Reference Data Score plot analysis was used to examine the impact of the reference data.Cor loadings were calculated for each variable for the displayed principal compon shown in Figure 6.The plot contains two ellipses indicating the magnitude of the v being considered.The outer ellipse is the unit circle and indicates the explained v of 100%.The inner ellipse indicates 50% of explained variance.The effect of the m index was not examined, as it is a calculated value.Based on the correlation loadin possible to determine which parameters determine each principal component.

Reference Data
Score plot analysis was used to examine the impact of the reference data.Correlation loadings were calculated for each variable for the displayed principal components, as shown in Figure 6.The plot contains two ellipses indicating the magnitude of the variance being considered.The outer ellipse is the unit circle and indicates the explained variance of 100%.The inner ellipse indicates 50% of explained variance.The effect of the maturity index was not examined, as it is a calculated value.Based on the correlation loadings, it is possible to determine which parameters determine each principal component.
The TSS value is located at the 100% ellipse.The DM is close to the 100% ellipse and is on the positive side, as is the TSS value.In contrast, the TA is in the negative range as expected, as the titratable acidity and the total soluble solids content of the sample move in the opposite direction during ripening.
The pH point is in the positive range between the 50 and 100% ellipse.This is interesting because pH and TA change in opposite directions due to the nature of pH.However, it should be noted that pH is not a robust property and therefore not the best indicator of the state of maturity.The first principal component is clearly determined by the TSS value (PC-1 = 95%), while PC-2 is determined by DM (PC-2 = 4%).Titratable acidity has a small effect (PC-3 = 1%) (Figure 6b).The TSS value is located at the 100% ellipse.The DM is close to the 100% ellipse and is on the positive side, as is the TSS value.In contrast, the TA is in the negative range as expected, as the titratable acidity and the total soluble solids content of the sample move in the opposite direction during ripening.
The pH point is in the positive range between the 50 and 100% ellipse.This is interesting because pH and TA change in opposite directions due to the nature of pH.However, it should be noted that pH is not a robust property and therefore not the best indi-

PLSR Results
The PLSR models with the best statistical parameters are summarized in Table 3.The maximum Mahalanobis limit was 0.5.Prediction models for Q 2 > 0.900 and RPD > 3 were obtained for both cross-validation and test set validation for all parameters tested except for dry matter content.
A good model has also been established for the statistical properties of pH, but this relationship is only apparently correct.The pH values had a very narrow measurement range (2.95-3.99)during the tests, often only varying within one hundredth of a percent.It was concluded that this property is not sensitive enough to determine maturity; therefore, this model is not included in Table 3.

Classification Methods
Classification models were tested according to maturity (mature/immature) and variety (Stanley/Elena).Taking into account the literature data and our measured results (Table 2), the TA and TSS ranges for the mature and immature stages were established as shown in Table 4.The classification of mature/immature samples was checked using ANOVA, Tukey's post hoc test and Duncan's new multiple range test for DM, TA, TSS and MI = TSS/TA (S1).As a first step of the spectrum-based classification, ten principal component PCA data reductions were performed.Classification models were then established for the mature/immature samples based on each of the investigated properties (Table 5).
The best-performing relationships were identified via different types of discriminant analysis (linear, quadratic, Mahalanobis).
Taking into account the reference data and the spectral data, it can be concluded that the same samples were classified as mature based on the parameters TA, TSS and TSS/TA by the two datasets, except for one sample.This one sample was S21, whose TSS fell within the range established for mature samples but whose TA was 1.16% by weight, i.e., outside the range of ≤1.00% established by us.Therefore, this sample was proved to be immature based on TA.
Unfortunately, as described earlier, DM and pH values are not considered good indicators of maturity status.The relationship between DM values and maturity is not fully clear.The same problem arises for pH values for the PLSR model.Therefore, no classification was performed for either DM or pH.
Using the classification models applied to the spectra, mature/immature samples could be classified with 100% accuracy.
For the different varieties, the classification of Stanley and Elena samples based on spectra analysis alone was also perfect, with 100% accuracy.
Ripeness is generally characterized by values of TA, TSS and MI.Measuring the hardness of the flesh of the fruit could be added in order to refine the evaluation of ripeness (Table S1).
An extension of the sampling period is also recommended.A longer sampling period would result in establishing categories of immature, medium mature, mature and over mature.The meaning of 'ripe', which is different in the sense of commerce, storage and canning, could also be specified.
The methods were validated with five-fold random cross-validation and test set validation.In the case of test set validation, the number of samples in the calibration and validation datasets was 48:20.
Based on our reference values, the typical concentration intervals for the mature and immature samples were determined for each parameter tested.
Various methods of pattern recognition and discriminant analysis, decision trees, the nearest-neighbor method, multilayer perceptron neural networks, naïve Bayes, partial least-squares discriminant analysis, random forests and support vector machines were

Figure 1 .
Figure 1.The investigated plum varieties at different stages of maturity ((a); immature and mature Prunus domestica cv.Stanley; (b) immature and mature Prunus domestica cv.Elena).
p i : estimated or predicted value of the ith component; N = number of samples; Q 2 = squared coefficient of determination for validation.

Figure 6 .
Figure 6.Correlation loadings: PC2 vs. PC1 (a) and the effect of properties on the principal components (b).

Figure 6 .
Figure 6.Correlation loadings: PC2 vs. PC1 (a) and the effect of properties on the principal components (b).

Table 2 .
Results of the reference measurements and reference data available in the literature.

Table 2 .
Results of the reference measurements and reference data available in the literature.

Table 3 .
The best PLSR models for cross-validation and test set validation.

Table 4 .
Classification data of mature and immature plums.

Table 5 .
Parameters of classification models based on spectral data.