Validation of two discriminant strategies applied to NIRS data spectra for detection of animal meals in feedstuffs

For developing qualitative or quantitative applications with spectroscopic data, such as near infrared spectroscopy (NIRS), different methodologies have been proposed in the mathematical statistical and computer science literature. Useful chemometrical alternatives have emerged, such as support vector machines (SVM), widely used for modeling multivariate and non-linear systems. These methods are usually compared using the classification performance and the success of results. The aim of the present work was to develop and validate a robust, accurate and fast discriminant methodology based on NIRS data to detect presence of animal meals in feedstuffs. A linear method, modified partial least square (PLS) analysis and one non-linear method (SVM) were studied. Results showed that modified PLS model allows obtaining coefficients of determination for cross validation around 0.97. Applying SVM strategy no false negatives were detected during training step. With both strategies the lowest percentage of misclassified samples on external validation was achieved with SVM, 0% with certified standard samples containing from 0.05% to 4% of animal meals. These results show SVM strategy as a robust method of classification for detecting animal meals in feedstuffs using NIRS methodology. Additional key words: animal nutrition; compoundfeeds; discriminant models; NIR spectroscopy; partial least square; support vector machine.


Introduction
In the history of development of feeds with a high nutrition value, by-products of animal origin were considered appropriate as ingredients in compound feeds.This inclusion was based on natural feeding patterns of carnivorous or omnivorous animals.However, the same strategy appeared to be profitable for herbivorous animals as well.Animal by-products can be readily compared to protein concentrates such us soybean hulls, but provide a higher amount of fat as energy source, as well as minerals (Ca and P).For these reasons quantities of animal meals in feeds for animal nutrition have become a common procedure, although, emergence of bovine spongiform encephalopathy (BSE) resulted in an abrupt ending of these practices (Sellier, 2003).After accepting that the most likely route of infection of cattle with BSE is by means of feeds containing different levels of animal proteins (Prince et al., 2003) the European Union (EU) provided Commission Decisions to ban these ingredients in feedingstuffs.In 2000 (EC, 2000), in the wake of BSE crisis, the EU introduced a total ban of animal meals in feedingstuffs for all farm animals which were kept, fattened or bred for the production of food, allowing their use only for pets.To regulate the prevention, control and eradication of certain transmissible spongiform encephalopaties the EU established different rules and derogations.Actually, the Regulation No 956/2008 (EC, 2008) permits the use of fishmeal in feedingstuffs for unweaned farmed animals of the ruminal species.
It is well known that in the EU the optical microscopy is the only official method for detection of animal meals (AM; EC, 2003) in feedstuffs.This method is a tedious task; it is time consuming and produces large quantities of highly toxic chemical waste (Van Raamsdonk et al., 2007).Besides, its performance depends largely on the expertise of the operator, and moreover it is not possible to detect the presence of AM in real time.Other proposed alternative methods are costly and time consuming; they are often defeated by thermal damage to protein or DNA, and are quite inappropriate for routine testing of the feed tonnage traded globally.The available methods have been published by Van Raamsdonk et al. (2007) in a recent review.Nevertheless, there is a clear need for alternative and/or complementary methods for routine testing of large amount of feeds marketed daily, in order to guarantee product safety as well as detect possible frauds (Garrido-Varo et al., 2005).In this sense, near infrared reflectance microscopy has been emerged to be a tool for detection of meat and bone meals in feedingstuffs (Von Holst et al., 2008).However, qualitative analysis in real time with this methodology it is not possible because sample pretreatment is required.
Near infrared spectroscopy (NIRS) has been used in a remarkable wide range of analytical applications, and after BSE crisis different publications have appeared showing the ability of this technology (Pérez-Marín et al., 2004, 2008a) to detect AM in feedstuffs.NIRS qualitative strategies (presence or absence) are based on discriminant analysis and pattern recognition, developing a class of methods primarily used to build classification rules for each specified subgroup.These rules are later used for allocating unknown samples to the most probable subgroup (de la Roza et al., 2007a).
Statistical packages are available to manage the spectral data information offering several procedures based on different chemometrical strategies.In order to extract and to analyze the information from NIRS spectral data, the most common strategies applied are those based on classical chemometric methods using linear regression methods, partial least squares (PLS) or different artificial neural networks architectures (Naes et al., 2002).As representative of non-linear approaches to classification we also evaluated the performance of support vector machines (SVM).Concerning spectroscopy data, some works reported comparison of SVM method performance to those linear or non-linear classification methods (Fernández-Pierna et al., 2004;Fernández-Ibáñez et al., 2010).
The present study aimed to evaluate and validate externally the efficiency of different chemometrical strategies (modified partial least square and support vector machine) applied to NIRS spectra data to detect AM contamination in feedstuffs.

Sample set and NIRS analysis
The total training sample set in this study included 704 commercial animal feeds provided from different manufacture companies including exactly the ingredients composition, and from inter-laboratory assays organized by the Spanish Ministry of Environmental and Rural and Marine Affairs (MARM).These samples included several animal species presented in different forms (flour, pellets of different sizes, crumbles, etc.): 240 compound feeds containing different types of animal-origin meals at various concentrations ranging from 0.1% to 35%, 125 only have meat and bone meal, 94 fish meal and 21 meat and bone meal (MBM) and fish meal; and 464 without animal meals adulteration.
A validation sample set (Table 1), with a total of 24 samples was used to externally evaluate the NIRS chemometrical strategies developed: 18 samples (set 1) were selected randomly, using the CENTER algorithm available in the WinISI software package (WinISI II, 2000), following the methodology proposed by Shenk and Westerhaus (1991) and six blind samples (set 2) provided by the MARM as part of an inter-laboratory assay.These standard certified feedstuffs (from interlaboratory assay) contained a concentration of AM (MBM, fish meal and blood meal) from 0.5% to 3.5%.
All spectral data were collected with a Foss NIR-System TM 6500 scanning monochromator (Silver Spring, MD) equipped with transport module, in a range from 400 to 2500 nm with a 2 nm path wavelength, in reflectance mode (log 1/R).Samples were scanned ungrounded, as raw materials using a natural products cell with an optical window of 4.7 cm wide, 20 cm long and 4.2 cm deep.Each sample was measured in two independent subsamples and after that spectra were averaged.All spectral data were recorded using the WinISI II software (WinISI II, 2000).

Chemometrical strategies
Chemometric analyses were executed with two strategies: Modified partial least square (MPLS) (WinISI II, 2000) and machine learning (ML) techniques that involve an implementation of support vector machine (Chih-Chung and Chih-Jen, 2001) and the Spider Library of objects for Matlab (Weston et al., 2006).
MPLS is an approach of linear regression based on classification procedures and linear discriminant analysis (Shenk and Westerhaus, 1993).PLS reduces the spectral data to a few combinations of absorptions that not only account for much of the spectral information but also related to the sample reference values.The modification to PLS is to scale the reference method data and reflectance data at each wavelength to have a standard deviation of 1.0 before each PLS term.This strategy was evaluated for detecting presence or absence of animal meals using as reference dummy variables with values -1 (animal meals free) or +1 (containing animal meals).The models were developed using the CENTER algorithm to eliminate outliers and to calculate spectral distances: Mahalanobis distance (GH) and neighbourhood distance (NH).GH measures the distance every sample is from the center of the spectral data and NH measures the distance between pairs of spectra.
To develop models were used four cross validation groups (i.e., the calibration set was partitioned in four groups; then each group was validated using a calibration developed over the other three groups), combining standard normal variate and detrend treatment for scatter correction (Barnes et al., 1993).First or second derivative treatments were tested: 1,5,5,1 and 2,5,5,1; where the first digit is the number of the derivate, the second is the gap over which the derivate is calculated, the third is the number of data points in a running average or smoothing and the fourth is the second smoothing.
The best discriminate model was selected using the classical statistics: lowest standard error of cross validation and the highest determination coefficient in cross-validation.Additionally, the criterion of the least number of errors in external validation results according to the percentage of samples correctly classified was considered as the most important.
The SVM method solves binary classification, regression and learning a ranking.This strategy separates positive from negative samples using a hyperplane that maximizes the margin (Vapnik, 1998).The margin is defined as the distance of the hyperplane to the nearest samples; these samples are the support vectors.SVM makes only one operation with the samples that is the scalar product of pairs of vectors.The way that this operation is made can be defined by the user by the kernel function k (Joachims, 1998).In the first stage of the training process it is generated a classification function from reference examples, which can be used to classify a new set of objects.
Prior to classification model development, it is necessary a sample pre-processing to normalize all spectra measure.The algorithm computes the distance between samples assigned to the same class.After selecting training set and eliminating outliers the next step is to develop SVM classification models to measure the similarity between pairs of patterns (Vanciuc, 2007).In this study a linear kernel was adopted to solve this problem which is linearly separable.
For a more detailed explanation of SVM theory, many references are available on kernel methods (e.g., Joachims, 1998) and support vector machines (e.g., Vapnik, 1998).

Results
Figures 1 and 2 show average spectra for the two populations (free or with AM).In order to avoid scatter effects in Figure 2 have been represented the average spec-

PLS algorithm
PLS discriminant equations were developed applying SNVD as pretreatment to remove the multiplicative interferences of scatter and enhance the spectral features and derivative as math treatment (first and second derivative).Figure 3 and Table 2 show the results and statistics associated with PLS models developed.The 1-VR value was 0.97 for both treatments, and SECV values were close to 0.16.
These developed calibration models were subsequently applied in external validation to classify validation sets 1 and 2. The results are detailed in Table 3.In set 1 not false negatives (samples contaminated with AM predicted as free) were observed with both discriminant models.All samples containing AM were correctly classified (100%).However, we can observe that five negative samples were detected as positive (false positives) employing first derivative and four samples when applying second derivative.It is necessary to remark that WinISI software (2000) accepts as good statistics GH and NH less than 3.0 and 1.0, respectively to be able of predicting unknown samples with a developed model.Both statistics parameters are based on Mahalanobis distance.The misclassified samples have a GH higher than four, except sample number fifteen with a GH value minor than three.
In set 2, with low levels of animal contamination, there is a clear penalty, two positive samples (samples 3 and 6) are detected as no-contaminated with GH < 3, resulting a false negative.Unfortunately, four samples of this training set showed a distance from the center of the data to their fitted point, Mahalanobis distance, greater than four.When the characteristics of the NIRS data are not included into cluster, the classification models are unsatisfactory for this purpose.

Support vector machines
To develop the chemometric model based on learning machines more importance was given to the correct NIRS sensors to detect animal meals in feedstuffs 45  identification of samples free of AM for the following reason: a false negative is unfair and can severely damage the reputation, honesty and results.Preliminary studies (de la Roza et al., 2007a) have established that linear kernels are generally superior to gaussian and quadratic kernels in predictive performance for detecting animal meals in feedstuffs.
The SVM external validation was made for comparing machine learning results with those obtained by MPLS.Results are detailed in Table 3.
In Table 4 are given the results for the SVM discrimination when using the leave-one out cross validation procedure.Results show the success of developed learning model with 100% of contaminated samples and 98.55% of free samples are correctly classified.
In validation set 1 (Table 3) five samples were classified by the model as misses (samples that can not be predicted with the developed model).The model classified contaminated samples correctly.Attending free samples (set 1), two samples (number 4 and 15) were misclassified as false positives, but these confusions are irrelevant, the problem is focused to obtain false negative.As regards, the results obtained in set 2, SVM model allows a clear discrimination even between samples contaminated with extremely low levels of AM (between 0.05-3.5% of AM).The SVM model gives the 100% of success in set 2 using standard certified samples.

Discussion
The establishment of spectral differences between samples free or containing AM is based on spectral bands related with crude protein or fat (de la Roza et al., 2007b).These results are in agreement with Murray et al. (2001) who have established the relationship between NIR bands and the content of polyunsaturated fatty acids to explain the variation in the samples according to the different animal species.
Regarding the predictive ability of PLS discriminant models developed, it is observed that our results were quite similar and comparable to those obtained by previous researches for detecting MBM in animal feeds (Pérez-Marín et al., 2008b).The dataset used in this work has a complex adulteration, because compound feedstuffs can be contaminated with meat and bone meal, fishmeal and/or blood meal, and all these ingredients can be detected with the developed models.
Similar results about false positives were reported in a previous work employing discriminate models constructed with spectral library of similar size and contaminated sample containing only MBM as forbidden ingredient (Pérez-Marín et al., 2008b).These results are related with animal precedence on the blood contamination in samples and the effect of these animal products in the spectra data.
Attending SVM, previous results indicated that SVM methodology has a place in NIR spectroscopy and chemometrics (Codgill and Dardenne, 2004;Fernández-Pierna et al., 2004).These authors confirmed that the form of radial basic function (RBF) kernel suggests that some form of scatter correction or baseline removal is necessary for successful implementation.Other authors have used SVM applications with classif ication purposes of the most representative ingredients in compound feed formulation such as wheat and sunflower meal (Fernández-Ahumada et al., 2008;Pérez-Marín et al., 2008a).
Comparing results obtained with both algorithms using the same NIRS data base as calibration set, it is concluded that SVM gave better results than MPLS.Neither developed model (MPLS, SVM) misclassified contaminated samples in set 1 as false negative samples.However, discrimination errors were increased by using MPLS when predicting samples containing the lowest percentage of AM (set 2).These external validation results show that SVM performs signif icantly better than MPLS in reducing the proportion of classification error of standard certified samples from 50% of MPLS to 0%.Additionally, and the most important success is that in no case were obtained false negatives.And secondly that with the SVM model is possible to predict a greater number of samples, although how to interpret and tune the parameters is more difficult task than with linear methods.
In summary, comparing MPLS and SVM it is possible to conclude that NIRS together with non-linear classifications methods (SVM), provide a method of classification for animal nutrition safety to detect animal meals in feedstuffs, even in very extreme training test situation with very low animal meals content (around 0.1%) more robust than MPLS alone.
The combination of NIR spectroscopy and SVM offer the promise of fast and reliable screening routine analysis to detect the presence of animal meals in common samples of processed animal feed.However, the spectral library must be increased with new samples time to time.

Figure 1 .
Figure 1.Average raw spectra of feedstuffs samples with or without animal meals.

Figure 2 .
Figure 2. Average raw spectra of feedstuffs samples with or without animal meals applying second derivative (a) and second derivative + standard normal variate and detrending (b).
applying second derivative plus standard normal variate and detrending.The main bands in NIR region to differentiate spectra with or free AM are allocated in regions characteristics of fat (1720-1760 nm) and protein absorption (2050-2274 nm) (see Fig.2b).

Figure 3 .
Figure 3. Predicted vs. reference values for cross validation results of the modified partial least squares chemometrical models using dummy variables (+1= containing animal meals and -1 = free of animal meals): a) first derivative, b) second derivative.

Table 1 .
NIRS sensors to detect animal meals in feedstuffs43 Description of the validation sample set AM: animal meals.

Table 2 .
Statistics associated with partial least squares (PLS) discriminant models for detection of animal meals in feedstuffs a NT: number of terms.b SEC: standard error of calibration.c RSQ: coefficient of determination for calibration.d SECV: standard error of cross validation.e 1-VR: coefficient of determination for cross validation.

Table 3 .
Prediction results in validation sets samples associated with modified partial least squares (MPLS) and support vector machine (SVM) methods a +1: samples with animal meals; -1: samples without animal meals.b -_ missed samples.