3.2.1. ACO-PLS Prediction Model of Apple Spoilage

The optimized parameters of the algorithm were set as follows: the initial population size was 50, the maximum number of cycles was 10, the maximum number of iterations was 50, the variable selection probability threshold P was 0.3 and the significance factor Q was 0.01. The characteristic variables of the sensor data were screened by the ACO method, and the screening results are shown in Figure 5a. Forty-eight characteristic variables were screened, and the ACO-PLS model results are shown in Figure 6a.

**Figure 5.** Variable selection results of apple spoilage days. (**a**) ACO-PLS, (**b**) CARS-PLS, (**c**) GA-PLS and (**d**) SA-PLS.

**Figure 6.** *Cont.*

**Figure 6.** Prediction model of apple decay days. (**a**) ACO-PLS, (**b**) CARS-PLS, (**c**) GA-PLS and (**d**) SA-PLS. Blue triangle represents calibration set and red circle represents prediction set.
