## 2 Materials and Methods
### Spectra Processing and Chemometric Model Development  
Relative spectra were calculated from the ROIs, and spectra pretreatment was required to reduce the random noises, baseline offset, non-uniformity in samples, and surface scattering, thus enhancing the accessibility of information related to the existence of black heart in a white radish. These pretreatment methods included Savitzky-Golay first derivative (SG1), Savitzky-Golay smoothing(SGS), detrend (D), standard normal variate (SNV), multiplicative scatter correction (MSC), autoscale (A), and mean center (M), as well as their combinations, and all were compared. The optimum method was determined based on the overall classification accuracy by a partial least square discrimination analysis model.  
After comparisons among the preprocessing procedures, partial least squares discrimination analysis (PLSDA), back propagation artificial neural network (BPANN), and support vector machine (SVM) methods were used to build calibration models for black heart identification. PLSDA is a multivariate inverse least squares discrimination method used for classification and discrimination problems (i.e., supervised classification). This produces essentially the same results as linear discrimination analysis (LDA), but with the noise reduction and variable selection advantages of partial least squares (PLS) [35]. BPANN is one of the most widely applied neural network models, as a type of feed-forward, supervised learning network which can adapt its knowledge by adjusting weights, based on the classification error of one or more outputs [36]. SVM was developed as a powerful algorithm with state-of-the-art performance in a variety of classification tasks. The algorithm is well-suited to deal with high dimensional data with low sensitivity to the curse of dimensionality. An SVM can search for a hyperplane between itself and the closest samples from each of two classes with maximal distance [37]. After optimum wavelengths are selected by SPA, new models of SPA-PLDA, SPA-ANN, and SPA-SVM were evaluated and compared for classification performance of black heart. Furthermore, the commonly used calibration method of [PERSON]'s linear discriminant analysis (FLDA), which is simple and easy in many practical applications (e.g., in-field evaluation), was also incorporated in the model SPA-FLDA.  
All calibration models were used to identify black heart in white radish for two classes (i.e., normal and black heart). Using the Kennard-Stone (KS) algorithm [38], all samples were divided into two groups, with two-thirds for the calibration set and one-third for the prediction set. As a result, for the two-class classification, 160 normal and 162 black heart samples were assigned to the calibration set and 87 normal and 93 black heart samples were assigned to the prediction set. Normal samples were labeled as 1, while black heart samples were labeled as 2. Calibration models were developed for the black heart classification, using MATLAB (Version 7.9, The MathWorks Inc., Natick, MA, USA, 2009) with the PLS toolbox (Version 7.9, Eigenvector Research Inc., Wenatchee, WA, USA, 2014). For each class, accuracy was defined as the percentage of predicted normal samples by models to the total normal samples, and predicted black heart samples by models to all black heart samples; the overall accuracy was the percentage of predicted normal plus black heart samples to the total samples.