Fast Measurement of Sugar in Fruits Using Near Infrared Spectroscopy Combined with Random Forest Algorithm
LI Sheng-fang1,2, JIA Min-zhi1, DONG Da-ming2,3*
1. Taiyuan University of Technology, Taiyuan 030024, China
2. Beijing Research Center for Intelligent Equipment for Agriculture, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China
3. National Engineering Technology Research Center for Agricultural Intelligent Equipment, Beijing 100097, China
Abstract:In recent years, many researchers have studied the measurement methods of fruit sugar and other internal quality by near-infrared (NIR) spectroscopy and some commercial instruments have been produced. However, due to the complexity of the NIR spectra, the transitivity of the models established with NIR is often poorly performed. The model is only built for a particular species or even a certain variety. Random forest (RF) is an integrated algorithm based on decision tree, which improves the prediction accuracy by integrating the classification regression tree (CART) model. Compared with partial least squares (PLS), multiple linear regression (MLR) and other methods, RF algorithm has the strong analytical ability of nonlinear data. Taking into account the randomness of the RF model, the model is optimized by debugging the number of decision tree (ntree) and the number of split variables (mtry). In this study, we used RF to predict the sugar content in different types of fruits (apple and pear). Experimental results showed that for the same kind of fruit, the modeling and predicting results of RF and PLS were better. However, for different types of fruits, RF significantly increased the prediction ability of the model. The R2 of PLS model was 0.878 and the R2 of RF model was increased to 0.999. The RMSEC of PLS model and RF model were respectively 0.453 and 0.015. In addition, the optimal RF model was tested by independent test set samples, the R2 of PLS model was 0.731 and the R2 of RF model was increased to 0.888. The RMSEC of PLS model and RF model were respectively 1.148 and 0.334. RF showed a significant advantage in predicting a variety of fruit sugar. This research proved that the RF method could be applied to detect the sugar content in fruits by NIR spectroscopy, thus solving the model problem of universality and transitivity.
Key words:Random forest; Near-infrared spectroscopy; Fruit sugar; Fast measurement
李盛芳,贾敏智,董大明. 随机森林算法的水果糖分近红外光谱测量[J]. 光谱学与光谱分析, 2018, 38(06): 1766-1771.
LI Sheng-fang, JIA Min-zhi, DONG Da-ming. Fast Measurement of Sugar in Fruits Using Near Infrared Spectroscopy Combined with Random Forest Algorithm. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2018, 38(06): 1766-1771.
[1] Choi J H, Chen P A, Lee B H N, et al. Scientia Horticulturae, 2017, 220: 147.
[2] Lee Y, Han S H. Bulletin of the Korean Chemical Society,2016,37(2):166.
[3] Nogales-Bueno J, Hernández-Hierro J M, Rodríguez-Pulido F J. Food Chemistry, 2014, 152: 586.
[4] Wu X, Wu B, Sun J, et al. Journal of Food Process Engineering, 2017,40(2).
[5] Toivonen P, Batista A, Lannard B, et al. Canadian Journal of Plant Science, 2017, 97(6):1030.
[6] Marques E J N, de Freitas S T, Pimentel M F, et al. Food Chemistry 2016, 197: 1207.
[7] DONG Jin-lei, GUO Wen-chuan(董金磊,郭文川). Optics Preci. Eng(光学精密工程), 2015,23(6):1530.
[8] LI Yan-xiao, HUANG Xiao-wei, ZOU Xiao-bo, et al(李艳肖, 黄晓玮, 邹小波, 等). Journal of Food Safety and Quality(食品安全质量检测学报), 2014, 5(6):1679.
[9] LI Mao-mao, ZHENG Xi-qun, REN Jian, et al(李毛毛, 郑喜群, 任 健, 等). Journal of Food Safety and Quality(食品安全质量检测学报),2015, 6(8): 3026.
[10] Xu H, Qi B, Sun T, et al. Journal of Food Engineering, 2012, 109 (1): 142.
[11] Li B, Wei Y, Duan H, et al. Vibrational Spectroscopy, 2012, 62: 72.
[12] MO Fei-fan, FAN Wei, ZHOU Ji-heng, et al(莫菲凡, 范 伟, 周冀衡, 等). Journal of Food Safety and Quality(食品安全质量检测学报), 2014, 5(8): 2430.
[13] CHEN Hua-zhou, CHEN Fu, SHI Kai(陈华舟, 陈 福, 石 凯). Transactions of the Chinese Society of Agricultural Machinery(农业机械学报), 2015, 46(5): 233.
[14] Olarewaju, Olaoluwa Omoniyi, Isa Bertling, et al. Scientia Horticulturae 2016, 199: 229.