为实现啤酒糖度和pH值的快速检测,采用可见/近红外光谱仪器得到360个啤酒样本的可见/近红外光谱数据.使用主成分分析(PCA)对数据进行降维处理以消除众多信息共存中相互重叠的部分,得到6个主成分值.将样本数据随机分为定标集和预测集,利用最小二乘支持向量机(LS—SVM)算法在定标集数据基础上建立啤酒糖度和pH值预测模型,并利用此模型对预测集样本进行预测.根据预测相关系数(r)和预测标准偏差(RMSEP)判断预测模型好坏,结果表明该模型对啤酒糖度预测的相关系数r为0.9829,RMSEP为0.1506;对啤酒pH值的预测相关系数r为0.9563,RMSEP为0.0494,预测精度明显高于神经网络和PLS预测,所以利用该模型能够准确的预测啤酒的糖度及pH值.
For the rapid detection of sugar content and pH in beer, visible and near infrared (VIS/NIR) spectra of 360 beer samples were collected by using VIS/NIR spectroradiometer. Principal component analysis (PCA) was applied for reducing the dimensionality in order to decrease the overlapped information of the raw spectral data, and 6 principal components (PCs) were selected. The samples were randomly separated into calibration set and validation set, and least squaressupport vector machines (LS-SVM) algorithm was used to build calibration model of sugar content and pH in beer, then the model was employed for the prediction of the validation set. Correlation coefficient (r) of prediction and root mean square error of prediction (RMSEP) were used as the evaluation standards. The results indicate that the r and RMSEP for the prediction of sugar content are 0. 9829 and 0. 1506, while 0.9563 and 0. 0494 for pH, respectively. The precision of prediction was obviously higher than that of neural network and PLS models. Hence, LS-SVM model with high prediction precision can be applied for the determination of sugar content and pH of beer.