cotton is an economically important plant grown world - wide as a principal source of staple fiber and vegetable oil . a great deal of effort has been made to improve cotton cultivation and characteristics by genetic engineering , such as adapting advantageous varieties to new geographical areas , increasing protein and oil contents of seeds , recovering more fertile varieties , and developing disease and insect resistance . although widely cultivated , transgenic plants have aroused wide concern among the public [ 46 ] , including the transfer of the introduced genes to wild plants and nontransgenic plants , the indirect effects of the transgenic crops on the environment , modification of the biodiversity of wildlife , unpredicted harmful changes in food products , and so on . therefore , there is an increasing demand for monitoring and verifying the presence and the amount of genetically modified organisms ( gmos ) in agricultural crops and in products derived [ 7 , 8 ] . to perform a transgenic analysis , the currently used methods for transgenic product identification include protein - based methods , dna - based methods , microscopy , spectroscopy , and chromatography [ 1 , 11 ] . the rationale behind nir transgenic analysis is the spectral absorbance of molecular bonds such as c  h , c n , and c  o that is related to the phenotypic changes ( expression level ) caused by genotypic changes . then , chemometric methods are used to extract detailed information concerning sample genotypes . for transgenic identification , some advantages make nir spectroscopy a useful alternative tool to biological analytical methods : ( 1 ) no or less sample preparation , ( 2 ) reduced analysis time and cost , ( 3 ) simultaneous characterization of multiple components influenced by genotype , and ( 4 ) feasibility of online analysis . however , compared with biological analysis methods , nir - transgenic analysis also suffers some disadvantages . firstly , due to the baseline , low signal - to - noise ratio ( snr ) and the natural weak absorbance of some components , the sensitivity of nir analysis is much lower . to increase the analytical sensitivity , proper data - preprocessing methods , such as smoothing , taking derivatives , and standard normal variate ( snv ) , are required to remove background , improve snr , and enhance spectral resolution . another practical problem is the existence of outliers which would degrade or spoil the classification models . considering the multivariate nature and uncertainty of potential spectral outliers , it is important to detect and exclude the real outliers before any chemometric models are developed . the aim of this paper is to develop a rapid , accurate , and robust method for genotype analysis of cotton plants ( parent , transgenic , and parent - transgenic hybrid ) by near infrared ( nir ) spectroscopy and robust partial least squares discriminant analysis ( plsda )   methods . to tackle the problem of outliers , robust principal component analysis ( rpca ) the influence of different data - preprocessing methods on model prediction performance was also investigated . the cotton plants of three different genotypes including parent , transgenic , and parent - transgenic hybrid were collected from two plantations as shown in table 1 . the collected leaves were cleaned with water and dried at 60c for 24 hours before grinding . for seed collection , both leaves and seeds were then ground into powders and finally sifted through a 0.45  mm sieve . nir spectra were collected using a tensor37 fourier transform nir spectrometer ( bruker , ettlingen , germany ) in the wavelength range of 400012000  cm . for each sample , 32 scans were performed with a resolution of 8  cm at 25c using opus6.5 software . the average of the 32 scans was used as a raw spectrum for further data analysis . firstly , nir spectra are of multivariate nature ; for example , a spectrum can have more than one thousand analytical channels , while the size of training set is usually less than 100 . therefore , in the case of  large p , small n  problem , sufficient description of the multivariate sample distribution usually requires dimension reduction of the measured data by latent - variable methods , such as pca . moreover , when performing outlier detection , the masking effects of multiple outliers need to be considered , so robust class models resistant to outliers are required .   robust principal component analysis ( rpca ) was based on robust estimators of principal components ( pcs ) and the resulted projection distances and residuals . hubert et al .   proposed an improved version of rpca algorithm , which was numerically more stable for high - dimensional data and computationally effective . in rpca , score distance ( sd ) is defined as the sample distance from the data center in pc space and orthogonal distance ( od ) as a measure of the pc projection residual . an object can be classified into one of the following four groups in terms of od and sd : good pca - leverage points ( with large sd and small od ) , orthogonal outliers ( with small sd and large od ) , bad pca - leverage points ( with large sd and large od ) , and regular objects ( with small sd and small od ) .   since pls is a commonly used method in chemometrics , here only a brief introduction to multiclass plsda the training nir spectral set can be arranged in an n  p matrix x containing the absorbance measurements at p wavelengths for n samples . for multiclass problems , n denotes the total size of all the b ( in this paper , b = 3 ) different classes . a response matrix y ( n  b ) is constructed containing the category variables of each sample in x , where each row vector in y indicates the class of a sample . if a sample belongs to class i(i = 1 : b ) , then the ith element of its response variable is assigned a value of 1 and otherwise 0 . then b pls models can be developed to fit each column of y using x. for prediction , an unknown object is classified into class j(j = 1 : b ) when the jth element of its predicted response vector is the nearest to 1 .   for plsda , an important problem is to select the number of latent components or determine the model complexity . including too many latent variables would lead to an unnecessarily complicated model that tends to overfitting , while selecting too few components would lose useful data information and fail to classify the samples sufficiently . therefore , an improved cross - validation algorithm , monte carlo cross - validation ( mccv ) , was used for this purpose . by multiple resampling and leaving out a higher percent of training samples for prediction , mccv has been proved to be a reliable method to estimate model complexity and can reduce the risk of overfitting effectively . the rmsemccv ( root mean square errors of mccv ) values with different model complexity were calculated and then tested with a well - established f - test procedure [ 19 , 20 ] . to avoid selecting too many latent variables , this f - test procedure determines model complexity as obtaining an rmsemccv not significantly higher than the lowest rmsemccv with least model complexity . to evaluate the performance of discriminant models , sensitivity and specificity of prediction set for each genotype were calculated as follows : 
 ( 1)sens.=tptp+fn ,  spec.=tntn+fp , 
 where tp , fn , tn , and fp denote the numbers of true positives , false negatives , true negatives , and false positives , respectively . all the data analysis was performed on matlab 7.0.1 ( mathworks , sherborn , ma ) . some of the measured spectra of cotton seeds and leaves from three different genotypes are shown in figure 1 . the interval between 12000  cm and 10000  cm is contaminated with significant noise and was excluded from data analysis . seen from figure 1 , for both seeds and leaves , the spectra of three genotypes assume very similar absorbance bands and the data are characterized by low absorbance and baseline . therefore , proper data preprocessing methods were required to reduce various undesirable factors in the raw data . figures 2 and 3 show the preprocessed spectra obtained by smoothing and taking second - order derivative and snv transformation for leaves and seeds , respectively . smoothed spectra seem to have an improved snr at the cost of losing some detailed information . second derivative can effectively improve resolution but has a degraded snr . from figure 3 , it is very obvious the detailed information around 7200  cm in second - order derivative spectra is very useful for classification . outlier detection was performed based on rpca of the raw spectral data at a significance level of 0.05 . because each genotype has a different sample distribution , rpca was performed on each of the genotype . to demonstrate the outlier diagnosis , 10 components account for 85.77% of the total variances and more components can not decrease the robust cross - validation press ( prediction sum of squares ) value significantly ; therefore , 10 components were selected . seen from figure 4(b ) , sample 13 was detected as orthogonal outliers and samples 22 and 35 as good pca - leverage points . to select a representative set covering a wide range of samples , only bad pca - leverage points and orthogonal outliers were excluded and good pca - leverage samples were retained . the outlier diagnosis results for three genotypes of leaves and seeds are summarized in table 2 . to select representative training and test sets for model training and validation , k - s algorithm   was used to split the samples into a training set and a test set . the k - s algorithm selects the set of training samples that covers the overall sample domain based on their distance ( euclidean distance ) from each other . because the distributions of different genotypes were different , k - s algorithm was performed on each subclass and then the obtained samples were combined to form a training set and test set .   table 3 demonstrates the splitting of training and test sets with outliers waded . with different preprocessing methods the sampling time of mccv was 100 and the significance level of the f - test was set to be 0.25 as proposed . the prediction results of test set are summarized in table 4 . seen from table 4 , second derivative and snv spectra obtained improved prediction accuracy compared with raw and smoothed spectra . for cotton seeds , second - order spectra can correctly classify all the test samples and snv spectra had just one object wrongly predicted . for leave samples , the effects of second - order derivative spectra on classification can be also seen from figure 3(b ) , where the three genotypes can be clearly distinguished from the naked eye by some detailed high - frequency information . compared with the raw data , smoothed spectra can not improve classification accuracy , which might be attributed to the loss of high - frequency spectral information . rapid and accurate discrimination of three different genotypes of cotton plants were developed by nir analysis of leaves and seeds . the best models obtained total classification accuracy of 100% and 97.6% for seeds and leaves , respectively . in order to tackle the problem of spectral outliers , robust pca models were applied to each subclass and were proved to be very effective . snv and second - order derivative can significantly improve the classification accuracy by removing background and baseline and enhancing resolution . spectral smoothing can not improve prediction performance due to the possible loss of high - frequency information . the results also demonstrate the removal of background and baseline plays a more important role than enhancing signal snr for classification .
this paper reports the application of near infrared ( nir ) spectroscopy and pattern recognition methods to rapid and automatic discrimination of the genotypes ( parent , transgenic , and parent - transgenic hybrid ) of cotton plants . diffuse reflectance nir spectra of representative cotton seeds ( n = 120 ) and leaves ( n = 123 ) were measured in the range of 400012000  cm1 . 
 a practical problem when developing classification models is the degradation and even breakdown of models caused by outliers . 
 considering the high - dimensional nature and uncertainty of potential spectral outliers , robust principal component analysis ( rpca ) was applied to each separate sample group to detect and exclude outliers . 
 the influence of different data preprocessing methods on model prediction performance was also investigated . 
 the results demonstrate that rpca can effectively detect outliers and maintain the efficiency of discriminant analysis . 
 moreover , the classification accuracy can be significantly improved by second - order derivative and standard normal variate ( snv ) . 
 the best partial least squares discriminant analysis ( plsda ) models obtained total classification accuracy of 100% and 97.6% for seeds and leaves , respectively .