欢迎您访问《智慧农业(中英文)》官方网站! English

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

• 专题--农产品加工与检测 • 上一篇    下一篇

基于随机蛙跳和支持向量机的牛乳收购分级模型构建

肖仕杰1(), 王巧华1,2(), 李春芳3,4, 赵利梅4, 刘鑫雅4, 卢士宇4, 张淑君3()   

  1. 1.华中农业大学 工学院,湖北 武汉 430070
    2.农业农村部长江中下游农业装备重点实验室,湖北 武汉 430070
    3.华中农业大学农业动物遗传育种与繁殖教育部重点实验室,湖北 武汉 430070
    4.河北省畜牧业 协会,河北 石家庄 050031
  • 收稿日期:2021-07-05 修回日期:2021-08-08 出版日期:2021-12-30
  • 基金资助:
    欧盟FP7构架项目(FP7-KBBE-2013-7-613689);国家重点研发计划(2017YFD0502002)
  • 作者简介:肖仕杰(1993-),男,硕士,研究方向为智能化检测与测控技术。E-mail:1175760869@qq.com
  • 通信作者:

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

摘要:

蛋白质、脂肪含量和体细胞数量作为牛乳收购中的重要参考指标,决定了牛乳的品质和价格。为批量准确地对牛乳品质进行分级,提高乳企的生产效率,本研究以3216份荷斯坦牛牛乳样本为研究对象,应用中红外光谱技术实现对收购过程中4种不同品质牛乳的检测分级。利用一阶导数和一阶差分对光谱进行预处理,并结合竞争性自适应重加权算法(Competitive Adaptive Reweighted Sampling,CARS)和随机蛙跳算法(Shuffled Frog Leaping Algorithm,SFLA)筛选出能代表不同牛乳的有效特征变量,建立支持向量机(Support Vector Machine,SVM)模型。其中,利用网格搜索法(Grid Search,GS)、遗传算法(Genetic Algorithm,GA)和粒子群算法(Particle Swarm Optimization,PSO)对SVM模型的关键参数——惩罚参数c和核函数参数g进行优化。结果表明,SFLA算法总体上优于CARS算法,PSO优化SVM模型的效果最佳。一阶差分预处理后,利用SFLA算法筛选特征变量建立的PSO-SVM模型,训练集准确率、测试集准确率和曲线下面积(Area Under Curve,AUC)分别为97.8%、95.6%和0.96489。该模型具有较高的准确率,在牛乳产业中具有实际应用价值。

关键词: 中红外光谱, 牛乳, 收购分级, 随机蛙跳, 支持向量机

Abstract:

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

中图分类号: