| With the rapid development of the fruit industry,fruit quality has become an inevitable trend.It is of great significance to quickly achieve fruit quality classification and origin tracing classification.Near-infrared spectroscopy analysis technology is simple,fast,environmental protection,has no sample pretreatment,and has been widely used in industry,agriculture,medicine,and other industries.In this paper,an improved sparrow search algorithm was proposed to optimize fruit near-infrared spectral feature selection,a qualitative classification model of the origin,and a quantitative prediction model of sugar content.The main research contents are as follows:(1)Aiming at the problem that the exploration and development stages of the traditional sparrow search algorithm are not obvious,that is,it is easy to fall into the origin in the early stage and not easy to converge to the best in the late stage,an enhanced sparrow search algorithm is proposed.The first 40% of the total iterations is taken as the exploration stage,and the search is carried out in the way of a sparrow converging to itself.The movement strategy of the sparrow population in the last 60%development stage was set as moving to the optimal position.Finally,the S-type transfer function,V-type transfer function,and threshold binarization are used to discretize the algorithm.Based on the proposed binary enhanced sparrow search algorithm,the feature selection of red fruit from Qinhuangdao,Xinjiang,and Shaanxi was realized in the near-infrared spectrum.The classification of red fruit from different origins was realized in combination with the K-nearest neighbor algorithm,and the comparison with the traditional sparrow search algorithm proved that the binary enhanced sparrow search algorithm had better feature selection ability.(2)Aiming at the problems that the traditional sparrow search algorithm tends to converge to the origin,fall into the local optimal,have weak ability to jump out of the local optimal,and have poor global search ability of sparrow population in the late iteration period,an improved sparrow search algorithm is proposed.By introducing linear change parameters and Levy flight to control sparrow moving step size,the FADs effect and eddy current effect are added to the disturbance sparrow population.Help the sparrow population jump out of the local optimal.Twenty-three groups of CEC standard functions and 12 groups of CEC2022 standard functions were used to simulate the algorithm,and the effectiveness of the proposed algorithm was verified.Based on the proposed improved sparrow search algorithm,the hyperparameter quantitative model of the hybrid kernel extreme learning machine was established to achieve the prediction of the sugar degree value of the giant peak.Compared with the traditional algorithm,the improved sparrow search algorithm has a better quantitative modeling effect.(3)Combining the binary enhanced sparrow search algorithm and the improved sparrow search algorithm,feature selection of near-infrared spectrum was realized and the super parameters of qualitative and quantitative models of support vector machine were optimized to complete the qualitative and quantitative modeling of the spectrum.Aiming at the classification and prediction of mandarin sugar degree of mandarin from different habitats,a binary enhanced sparrow search algorithm feature selection model and an improved sparrow search algorithm were established to optimize the qualitative and quantitative models of support vector machine super parameters.The model was compared with the classification and prediction results of support vector machine super parameters optimized by traditional sparrow search algorithm,genetic algorithm,and particle swarm optimization algorithm.Verify the validity of the proposed method.Aiming at a series of problems existing in the traditional sparrow search algorithm and combining with the requirement of fruit near-infrared spectrum analysis,this paper proposes and proves that the binary enhanced sparrow search algorithm has a better feature selection effect,the improved sparrow search algorithm has stronger parameter searchability and can obtain higher spectral classification accuracy and parameter prediction accuracy.It provides a new method for near-infrared spectrum feature extraction and qualitative and quantitative modeling of fruit. |