*3.4. PLSR Results of SSC for Each Fruit Size Set*

The number of LVs in the PLSR model was set from 1 to 20 to prevent the overfitting or underfitting of the model. Table 3 shows the PLSR results established for individual fruit size sets after several pretreatment methods.

From Table 3, it can be seen that the PLSR prediction performance of the SSC established by SNV pretreatment of apple NIR spectra for the three sets of fruit sizes is the best, and the correlation coefficients Rp of the models are 0.863, 0.947, and 0.917, respectively, and the root mean square error values RMSEP of the prediction sets are 0.771, 0.622, and 0.752, respectively. The scatter plot of PLSR prediction is shown in Figure 3. It can be seen that the pretreatment method SNV can eliminate the effect of sample particle size on NIR spectra [26], thus solving the influence of spectral dispersion due to the unequal sample dimensions.

### *3.5. Individual Fruit Size Groups Predicted Other Fruit Size Groups*

It can be seen from Table 3, the PLSR prediction performance of SSC established when the apple size was 75–85 mm was better. To investigate whether the prediction performance of the model could be achieved when more variance samples were included in the model, the PLSR results for the remaining two fruit size groups using the medium apple size group to predict the SSC are shown in Table 4.


**Table 3.** PLSR findings for SSC of various apple size groups after spectra pretreatment.

MSC: multivariate scattering correction; SNV: standard normal variables transformation; S-G smoothing: Savitzky-Golay smoothing; Lvs, latent variable individual.

**Figure 3.** Scatter plot of PLSR prediction of apple SSC for three apple diameter sets. (**a**) apple size 65–75 mm, (**b**) apple size 75–85 mm, and (**c**) apple size 85–95 mm.

**Table 4.** The fruit size group alone predicted the SSC results of other fruit size groups.


As can be seen from Table 4, the PLSR prediction performance of soluble solids content built from the modeling and prediction sets was poor when the difference in apple fruit size was significant between them. Compared with Table 3, the correlation coefficient Rp decreased from 0.863 to 0.769 and the root means square error value RMSEP increased from 0.771 to 0.990 for the PLSR of the small fruit size group. The correlation coefficient Rp decreased from 0.917 to 0.787 and the root means square error value RMSEP increased from 0.752 to 878 for the PLSR of the large fruit size group. The scatter plot of its PLSR is shown in Figure 4. Apple size differences significantly impacted the accuracy of the SSC model. With the same variety of apples, there will be differences in volume size, and the size differences will affect the detection performance when performing NIR spectroscopy, so it is necessary to correct the NIR spectra of apples of different sizes to improve the detection performance of NIR detection equipment.

**Figure 4.** Scatter plot of PLSR with different fruit diameter of modeling set and prediction set. (**a**) 75–85 mm apple size group predicted 65–75 mm apple size group, (**b**) 75–85 mm apple size group predicted 85–95 mm apple size group.
