Welcome to Smart Agriculture 中文

Smart Agriculture ›› 2021, Vol. 3 ›› Issue (4): 77-85.doi: 10.12133/j.smartag.2021.3.4.202107-SA003

• Topic--Agricultural Products Processing and Testing • Previous Articles     Next Articles

Construction of Milk Purchase Classification Model Based on Shuffled Frog Leaping Algorithm and Support Vector Machine

XIAO Shijie1(), WANG Qiaohua1,2(), LI Chunfang3,4, ZHAO Limei4, LIU Xinya4, LU Shiyu4, ZHANG Shujun3()   

  1. 1.College of Engineering, Huazhong Agricultural University, Wuhan 430070, China
    2.Key Laboratory of Agricultural Equipment in the Mid-Lower Reaches of the Yangze River, Ministry of Agriculture and Rural Affairs, Wuhan 430070, China
    3.Key Laboratory of Animal Breeding and Reproduction of Ministry of Education, Huazhong Agricultural University, Wuhan 430070, China
    4.Hebei Animal Husbandry Association, Shijiazhuang 050031, China
  • Received:2021-07-05 Revised:2021-08-08 Online:2021-12-30 Published:2022-01-24
  • corresponding author: WANG Qiaohua,ZHANG Shujun E-mail:1175760869@qq.com;wqh@mail.hzau.edu.cn;sjxiaozhang@mail.hzau.edu.cn


Protein, fat and somatic cells are three important reference indicators in milk purchase, which determine the quality and price of milk. The traditional chemical analysis methods of these indexes are time-consuming and pollute the environment, while the mid-infrared spectrum has the advantages of fast, non-destructive and simple operation. In order to realize the rapid classification of milk quality and improve the production efficiency of dairy enterprises, 3216 Holstein milk samples were chosen as the research objects and mid-infrared spectroscopy technology was applied to realize the detection and classification of 4 different quality milks during the purchase process. The spectrum was preprocessed by using the first derivative and the first difference, and combined with the algorithm competitive adaptive reweighted sampling (CARS) and the shuffled frog leaping algorithm (SFLA), the effective characteristic variables that could represent different milks were selected, and the SVM model was established. Among them, the penalty parameter c and the kernel function parameter g which were the key parameters of the SVM model were optimized by using the grid search method (GS), genetic algorithm (GA) and particle swarm algorithm (PSO). The training time of GS, GA and PSO algorithms were compared, the results showed that the training time of GS was much longer than that of GA and PSO algorithms.The SFLA algorithm was generally better than the CARS algorithm, and the PSO optimized the SVM model the best. After the first-order difference preprocessing, the PSO-SVM established by using the SFLA algorithm to filter the characteristic variables, the accuracy of the training set, the accuracy of the test set and the AUC were 97.8%, 95.6% and 0.96489, respectively. This model has a high accuracy rate and has practical application value in the milk industry.

Key words: mid-infrared spectrum, milk, purchase classification, shuffled frog leaping algorithm, support vector machine

CLC Number: