Journal of Spectroscopy

Journal of Spectroscopy / 2018 / Article

Research Article | Open Access

Volume 2018 |Article ID 4230681 |

Jun Liu, Tie-Jun Pan, Zheng-Yong Zhang, "Incremental Support Vector Machine Combined with Ultraviolet-Visible Spectroscopy for Rapid Discriminant Analysis of Red Wine", Journal of Spectroscopy, vol. 2018, Article ID 4230681, 5 pages, 2018.

Incremental Support Vector Machine Combined with Ultraviolet-Visible Spectroscopy for Rapid Discriminant Analysis of Red Wine

Academic Editor: Vincenza Crupi
Received05 Dec 2017
Accepted07 Mar 2018
Published10 Apr 2018


The aim of this work is to develop a new method to overcome the increased training time when a recognition model is updated based on the condition of new features extracted from new samples. As a common complex system, red wine has a rich chemical composition and is used as an object of this research. The novel method based on incremental learning support vector machine (I-SVM) combined with ultraviolet–visible (UV-Vis) spectroscopy was applied to discriminant analysis of the brands of red wine for the first time. In this method, new features included in the new training samples were introduced into the recognition model through iterative learning in each iteration, and the recognition model was rapidly updated without significantly increasing the training time. Experimental results show that the recognition model established by this method obtains a good balance between training efficiency and recognition accuracy.

1. Introduction

Ultraviolet–visible (UV-Vis) absorption spectra of red wine samples can be obtained using a UV spectrophotometer. These differences of peak shape, height, and area of UV-Vis spectra characterize the disparity of composition and the degree of unsaturation of components contained in red wine samples, which reflect the overall characteristics of red wine. UV-Vis spectroscopy has the characteristics of high sensitivity, good reproducibility, high efficiency, and low cost.

Different pattern recognition algorithm with UV-Vis spectroscopy has been used to detect red wines [19]. However, the traditional method of pattern recognition is a kind of off-line training method, which trains a classifier with labeled sample datasets for recognition. The quality of red wine is mainly determined by the raw materials of grape and the brewing process, while the quality of raw material is greatly influenced by the climate of the place of production, which makes the tastes of different batches of red wines of the same brand have subtle differences, and the corresponding spectral data also change. So the classification accuracy of the classifier trained by off-line data will be significantly reduced. The solution is usually to retrain the classifier, but the retraining requires a large number of training samples and training time, this cost is unbearable. Therefore, how to adapt the classifier trained by the old labeled data to the identification of new samples is a difficult problem in on-line identification [1013].

Support vector machine (SVM) has been successfully used for data mining, pattern recognition, and artificial intelligence fields. With labeled data, SVM learns a boundary (i.e., hyperplane) separating different class data with maximum margin. The classification process usually face the new evolving data; the initial training sample data cannot reflect all the sample information. When new training samples are accumulated to a certain scale, in order to obtain the new sample information, it would like to integrate these examples and train a new classification model. However, the training of a SVM model has the time complexity of O(n3) (n is the number of training samples); it does benefit large-scale online applications [1417].

It is noteworthy that performance of classification method for red wine is evaluated not only based on accuracy but also on rapidity, which are also of great significance in practical applications. To attack this problem, lots of works have been done. One way is to reduce training samples with a certain sample selection strategy. The quality of training data set is vital to the performance of the classifier being constructed. Bennett et al. worked out an incremental algorithm based on SVM, which retains only the support vector set as a historical training sample [1318].

The main contribution of this paper is that a novel hybrid classification method based on principal component analysis (PCA) and incremental support vector machine (I-SVM) [17, 18] combined with UV-Vis spectra is proposed. Experimental results indicated that PCA-I-SVM, as a classifier, was tested in terms of classification rate and running time. Compared with normal SVM, PCA-I-SVM can run much faster with similar accuracy rate. Experimental results showed that PCA-I-SVM combined with UV-Vis spectra can be a rapid, accurate method for classification of red wine.

2. Experiments and Materials

2.1. Sample Collection and Preparation

Nine brands of red wine, a total of 54 wine samples, were purchased from a well-known e-commerce website in China. At the same time, in order to verify the time efficiency of incremental learning algorithm, a total of 5400 samples of 100 batches of samples were simulated by Monte Carlo method.

2.2. UV-Vis Spectrum Acquisition

The UV-Vis spectra were obtained from a UV-Vis spectrometer, T6 New century, Purkinje General Instrument Co., Ltd. (Beijing, China). Water was used as the zero point. Each test sample was prepared through mixed 100 μL wine with 3 mL water. The scanning range of the UV-Vis spectrum of each sample was 240~550 nm.

2.3. Data Preprocessing

In this study, we used PCA to remove redundant features, and several previous principal components were extracted as the input of the classifier for red wine. PCA is a method for the reexpressing multivariate data. It allows the researcher to reorient the data so that the first few dimensions account for as much of the available information as possible. The principal component solution has the property that each component is uncorrelated with all others, which has the advantage of eliminating multicollinearity.

The number of the generated features was still quite large for the classifier. So PCA was used to perform feature reduction before pattern recognition, and then I-SVM was used for classification of red wine.

2.4. Incremental SVM Learning Based on Support Vector

In order to make the SVM learning algorithm incremental, reducing the number of training data sets is an effective way to apply SVM classification for large data sets. Because support vectors are a sufficient description of the decision boundary between the examples, then at each incremental step, the representation of the old sample data is given by the set of support vectors. Such support vectors are incorporated with the new incoming batch of data to provide the training data for the next step. Since the number of support vectors is small compared to the total number of training examples, this method can effectively reduce the number of samples.

Now, suppose that labeled data is the UV-Vis spectra data, where is the red wine class number, represents the th samples in class , is the number of samples in class . The overall red wine sample size is , which is expressed by: .

The incremental SVM algorithm framework is shown in Figure 1: (1)Uses labeled UV-Vis spectra data to initialize SVM classifier(2)For each incremental learning step. Creating subsets from UV-Vis spectra data set . For each class data set , compute the support vector set , then concatenate (3)Uses and new labeled UV-Vis spectra data as train data set to train SVM model, and get support vector set , then get the updated classifier(4)Repeating steps (2) and (3) enable continuous incremental learning of new batch labeled UV-Vis spectra data

2.5. Model Validation

To assess the performance of the established classifier, leave-one-out cross-validation and 10-fold cross-validation were conducted. These cross-validations fully assessed the performance of the classification model.

3. Data Analysis

UV-Vis spectra can quickly obtain sample information about the functional groups in aromatic compounds, and have significant advantages that include simple sample preparation, rapid analysis, high sensitivity, robustness, green process, and low cost.

Since the UV-Vis spectra mainly reflected the main compounds of the red wine, UV-Vis spectra of red wine are extremely similar and difficult to be identified manually, as shown in Figure 2. These spectra of red wine at 240~550 nm are similar. The UV-Vis absorption around 260~275 nm could be attributed to pi-pi electron transition between bonding pi orbital to antibonding pi orbital; for example, unsaturated hydrocarbon and aromatic hydrocarbons. In traditional spectral analysis, Beer-Lambert law was used commonly, that is, the maximum absorption peak and the concern between specific substances were applied to analyze, and the utilization rate of spectral information was relatively low. In fact, the information of the UV-Vis spectra of red wine is very rich; its peak shape, area, width, and so on are closely related to these quality of the sample. However, if we only rely on the observation of these spectra, it is not appropriate to make a visual judgment of the quality of the red wine, because most of the time, different molecules contribute to the similar peak. In order to overcome this limitation of visual analysis, statistical methods are mostly used for the further analysis of the UV-Vis spectra. With the statistical approach, one can extract useful information from the data set by highlighting the similarities and differences. In this study, we used I-SVM for the classification of red wine in order to efficiently handle large amounts of sample data.

4. Result and Discussion

4.1. Raw Data of Characteristic Information

The chemical components and relative contents of different red wines are different; these will produce different associations, so it determines the spectral curves of different red wines are somewhat different and has different characteristics and fingerprints. The difference between the spectra is the variation of relative intensities of the absorption peaks in the fingerprint region and the minute difference in the small peaks in the fingerprint region. Pattern recognition algorithm can maximize the information extracted from the data and can classify the sample set.

4.2. Red Wine Classification
4.2.1. Data Preprocessing Results with PCA

The dimension of feature space generated by PCA is not determined by itself, and depended on the final classification rate and efficiency. According to Figure 3, we utilize 8 principal components as feature vectors, thinking of account the balance between efficiency and classification accuracy.

4.2.2. Classification Result with I-SVM

I-SVM algorithm was used to classify the nine brands of red wine samples. We selected the RBF function as the kernel function, and the kernel parameter was optimized by using grid search with cross-validation method. We used leave-one-out cross-validation and 10-fold cross-validation to assess the performance of these classifiers.

4.2.3. Compare Data Processing Efficiency and Accuracy

For comparison, three different algorithms were simulated. Algorithm 1 is the normal SVM algorithm, which uses all the samples to solve the support vector for each incremental learning. Algorithm 2 is I-SVM algorithm, which uses the support vector set for incremental learning. Algorithm 3 is the multilayer perceptron neural network (MLPNN) algorithm. The initial sample set is 300 samples randomly selected from all samples, and 510 samples are added for each incremental learning. The results are shown in Figure 4.

I-SVM algorithm iteratively chooses the support vectors set and the new sample set as training data set at each increment learning step, and it greatly saves the computation time and accelerates the simulation speed and basically has the same classification accuracy. Meanwhile, with the continuous learning of incremental learning, the algorithm can naturally make part of the support vectors into non-SV vector to achieve the selective forgetting of the historical data of the training. Therefore, when dealing with a large number of new training data, the speed advantage of I-SVM algorithm is more remarkable.

5. Conclusion

The experiment will be UV-visible spectroscopy and I-SVM combination of red wine used online identification. After the pretreatment of the samples of red wine, the ultraviolet spectral fingerprint library of nine kinds of red wine was established by UV spectrophotometer. After dimensionality reduction by PCA, an incremental SVM model was established to identify the red wine. The recognition rate of red wine reached 94.9%. At the same time, in order to verify the time efficiency of the algorithm, a total of 5400 samples of 100 batches of samples were simulated by Monte Carlo method. The recognition rate of wine reached 96.78%. The average training time of I-SVM models for each batch was 0.47seconds with standard deviation of 0.03, one-thirteenth of the average time of normal SVM. The method provides a reliable, stable, rapid, and completely new method for the identification of online red wine and provides a method basis for quality evaluation and quality control of red wine.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.


This paper was supported by the National Natural Science Foundation of China (no. 61373058, 61602217), Ningbo Natural Fund (no. 2017A610126), Ningbo intelligent team business plan project (Ningbo World Information Technology Development Co. Ltd.), Ningbo Leader and Top-Notch Talent and Ningbo Wisdom Team Project, Ningbo Dahongying College Sciences support project, Ningbo Soft Science Fund (2016A10053), 2017 Zhejiang Science and Technology Innovation Program for College Students, and the National Undergraduate Innovative Training Program (201713001015).


  1. M. Sha, C. Song, Z. Zhang, S. Wang, J. Liu, and H. Wang, “Discrimination of apple essences based on spectral data fusion combined with pattern recognition algorithm,” Food Science, vol. 37, no. 22, pp. 192–197, 2016. View at: Google Scholar
  2. M. J. Martelo-Vidal and M. Vázquez, “Determination of polyphenolic compounds of red wines by UV–VIS–NIR spectroscopy and chemometrics tools,” Food Chemistry, vol. 158, pp. 28–34, 2014. View at: Publisher Site | Google Scholar
  3. M. J. Martelo-Vidal and M. Vázquez, “Classification of red wines from controlled designation of origin by ultraviolet-visible and near-infrared spectral analysis,” Ciência e Técnica Vitivinícola, vol. 29, no. 1, pp. 35–43, 2014. View at: Publisher Site | Google Scholar
  4. C. Alamprese, M. Casale, N. Sinelli, S. Lanteri, and E. Casiraghi, “Detection of minced beef adulteration with turkey meat by UV–vis, NIR and MIR spectroscopy,” LWT - Food Science and Technology, vol. 53, no. 1, pp. 225–232, 2013. View at: Publisher Site | Google Scholar
  5. D. Cozzolino, “The role of visible and infrared spectroscopy combined with chemometrics to measure phenolic compounds in grape and wine samples,” Molecules, vol. 20, no. 1, pp. 726–737, 2015. View at: Publisher Site | Google Scholar
  6. M. J. Martelo-Vidal and M. Vázquez, “Application of artificial neural networks coupled to UV–VIS–NIR spectroscopy for the rapid quantification of wine compounds in aqueous mixtures,” CyTA - Journal of Food, vol. 13, no. 1, pp. 32–39, 2015. View at: Publisher Site | Google Scholar
  7. S. M. Azcarate, M. Á. Cantarelli, R. G. Pellerano, E. J. Marchevsky, and J. M. Camiña, “Classification of Argentinean Sauvignon blanc wines by UV spectroscopy and chemometric methods,” Journal of Food Science, vol. 78, no. 3, pp. C432–C436, 2013. View at: Publisher Site | Google Scholar
  8. K. Skogerson, M. Downey, M. Mazza, and R. Boulton, “Rapid determination of phenolic components in red wines from UV-Visible spectra and the method of partial least squares,” American Journal of Enology and Viticulture, vol. 58, pp. 318–325, 2007. View at: Google Scholar
  9. F. J. Acevedo, J. Jiménez, S. Maldonado, E. Domínguez, and A. Narváez, “Classification of wines produced in specific regions by UV−visible spectroscopy combined with support vector machines,” Journal of Agricultural and Food Chemistry, vol. 55, no. 17, pp. 6842–6849, 2007. View at: Publisher Site | Google Scholar
  10. A. S. Luna, A. P. da Silva, J. Ferré, and R. Boqué, “Classification of edible oils and modeling of their physico-chemical properties by chemometric methods using mid-IR spectroscopy,” Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy, vol. 100, pp. 109–114, 2013. View at: Publisher Site | Google Scholar
  11. H. Abdi and L. J. Williams, “Principal component analysis,” Wiley Interdisciplinary Reviews: Computational Statistics, vol. 2, no. 4, pp. 433–459, 2010. View at: Publisher Site | Google Scholar
  12. X. Zhou, L. K. Dai, and S. Li, “Fast discrimination of edible vegetable oil based on Raman spectroscopy,” Spectroscopy and Spectral Analysis, vol. 32, no. 7, pp. 1829–1833, 2012. View at: Google Scholar
  13. K. P. Bennett and E. J. Bredensteiner, Geometry in Learning, Geometry at Work, C. Gorinieditors, Mathematical Association of America, Washington, DC, USA, 2000.
  14. Y. J. Lee and S. Y. Huang, “Reduced support vector machines: a statistical theory,” IEEE Transactions on Neural Networks, vol. 18, no. 1, pp. 1–13, 2007. View at: Publisher Site | Google Scholar
  15. P. Laskov, C. Gehl, S. Kruger, and K. R. Müller, “Incremental support vector learning: analysis, implementation and applications,” Journal of Machine Learning Research, vol. 7, no. 3, pp. 1909–1936, 2006. View at: Google Scholar
  16. B. Gu, G.-S. Zheng, and J.-D. Wang, “Analysis for incremental and decremental standard support vector machine,” Journal of Software, vol. 24, no. 7, pp. 1601–1613, 2013. View at: Publisher Site | Google Scholar
  17. I. W. Tsang, J. T. Kwok, and P. Cheung, “Core vector machines: fast SVM training on very large data sets,” Journal of Machine Learning Research, vol. 6, pp. 363–392, 2005. View at: Google Scholar
  18. D. M. J. Tax and P. Laskov, “Online SVM learning: from classification to data description and back,” in 2003 IEEE XIII Workshop on Neural Networks for Signal Processing (IEEE Cat. No.03TH8718), pp. 499–508, Toulouse, France, 2003. View at: Publisher Site | Google Scholar

Copyright © 2018 Jun Liu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Related articles

No related content is available yet for this article.
 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles

No related content is available yet for this article.

Article of the Year Award: Outstanding research contributions of 2021, as selected by our Chief Editors. Read the winning articles.