Spectroscopy and Spectral Analysis, Volume. 42, Issue 5, 1601(2022)

Hyperspectral Analysis of Milk Protein Content Using SVM Optimized by Sparrow Search Algorithm

Mei-chen LIU*, He-ru XUE*;, Jiang-ping LIU, Rong-rong DAI, Peng-wei HU, Qing HUANG, and Xin-hua JIANG
Author Affiliations
  • College of Computer and Information Engineering, Inner Mongolia Agricultural University, Huhhot 010000, China
  • show less

    Milk contains many nutritional elements needed by the human body, such as fat, protein, calcium, etc. Therefore, analysing nutritional elements in milk is a key part of milk safety detection. Hyperspectral technology can effectively identify nutritional elements in milk by combining image and spectral data. In order to quickly and accurately predict protein content in milk, the Competitive Adaptive Reweighted Sampling (CARS) algorithm was used to select characteristic wavelengths. A method based on Sparrow Search Algorithm (SSA) to optimize Support Vector Machine (SVM) was proposed to predict milk protein content. The reflectance spectra of milk (400~1 000 nm) extracted by the hyperspectral spectrometer were used for the experiment. During Normalization (N), Standardization and Multiplicative Scatter Correction (MSC), the original milk data are used for spectral noise reduction to improve spectral utilization. The successive projections algorithm (SPA) and the competitive adaptive re-weighting algorithm were used to extract the feature wavelengths from the processed milk spectral data. The correlation coefficients between proteins and the spectrum were calculated and ranked by importance to obtain the important feature wavelengths. In the end, through SVM, the Genetic Algorithm (GA)-SVM, Particle Swarm Optimization (PSO)-SVM and Partial Least-Regression (PLS) algorithm was used to predict milk proteins and compare the prediction results. In order to improve the accuracy of protein prediction and model stability, SSA was proposed to optimize the kernel function G and penalty parameter C of SVM. Root Mean Squared Error (RMSE) was used as the fitness function, and the optimal regression parameters were selected through iteration to train the model. The results of milk data prediction showed that the optimal combination model was MSC-CARS-SSA-SVM. The determination coefficient R2 of the model test set was 0.999 6, the root means square error RMSE was 0.001 1, and the time was 4.112 1 seconds. The results show that the CARS algorithm can extract the characteristic bands and eliminate redundant information, thus improving the efficiency of the model and simplifying the algorithm's complexity. The SSA algorithm optimizes SVM's parameters and can quickly obtain the global optimal solution by iteratively updating the optimal position. Compared with SVM, GA-SVM, PSO-SVM and PLS, the prediction accuracy and model stability are significantly improved, which meets the accuracy requirements of milk detection, and is a feasible new method for fast detection of milk protein. It provides a theoretical reference for the optimization of spectral models and the improvement of prediction model accuracy.

    Tools

    Get Citation

    Copy Citation Text

    Mei-chen LIU, He-ru XUE, Jiang-ping LIU, Rong-rong DAI, Peng-wei HU, Qing HUANG, Xin-hua JIANG. Hyperspectral Analysis of Milk Protein Content Using SVM Optimized by Sparrow Search Algorithm[J]. Spectroscopy and Spectral Analysis, 2022, 42(5): 1601

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category: Research Articles

    Received: Apr. 16, 2021

    Accepted: --

    Published Online: Nov. 10, 2022

    The Author Email: LIU Mei-chen (lmcdrr@163.com)

    DOI:10.3964/j.issn.1000-0593(2022)05-1601-06

    Topics