## 2 Materials and Methods
### Classification Model Development  
A preliminary investigation showed that a Gradient Boosted Tree (GBT) algorithm [28], a machine learning technique that uses an ensemble of decision trees to address a regression or a classification problem, provides better classification performance than other tested algorithms such as Logistic Regression, Decision Trees, Deep Learning and Random Forest [15]. Hence, for this study, the GBT algorithm was chosen to build the classification model. For this task, we used the software platform RapidMiner Studio, version 9.6.  
Throughout the modeling process, the data were first divided into subsets for training the model and for validating the model. The training subset included 75% of the total samples, whereas the remaining 25% represented the test set. The latter was used toevaluate the performance of the classifier learnt during the training phase or, more precisely, to estimate the classifier accuracy, specificity, recall and precision values.  
* _Accuracy_: the ratio between the number of correctly predicted samples and the total number of samples;
* _Precision_: the proportion of correctly predicted samples of a chosen class among all the samples predicted as samples of that class;
* _Recall_ (or _Sensitivity_): the proportion of correctly predicted samples of a chosen class among all the samples from that class;
* _Specificity_: the rate of correctly rejected samples for predicting a chosen class in binary classification.  
The test set was first divided into seven randomly chosen subsets with approximately equal size, and the model was applied on each one of them. The obtained results allowed the identification and then the exclusion of the two subsets, among the seven, on which the model performed with the highest and the lowest accuracy, respectively. The final results represent the average performance of the model applied to the remaining five subsets.  
Given that there could be an important correlation between samples from the same plant, to avoid bias in evaluating the model's performance, the training set was built on samples from 9 of the 12 plants, whereas the test set was built from the remaining 3 plants. The plants in each subset were randomly chosen, but it was assured that the test set was composed of plants recorded with different acquisition devices.  
During the training phase, the main GBT parameters--number of trees, maximum depth, and learning rate--were tuned within a grid search. The tested values for number of trees were [100, 200, 300], the maximal depth [4, 7, 9], and the learning rate [0.05, 0.1 and 0.3]. Hence, 27 possible combinations of these parameters' values were evaluated.  
The procedure of learning the optimal combination of parameters involved a nine-fold customized cross-validation process, nine being the number of plants whose samples were enclosed in the training set. More precisely, for a given combination of the three parameters, the original training set was subdivided into two subsets: (1) a set for learning the model containing only the samples of eight out the nine plants and (2) a test set for evaluating the learnt model enclosing the samples of the remaining ninth plant. Keeping the same parameter values, this procedure was repeated nine times in a way that the samples of each plant will represent the test set once only. At the end, the parameters' values are chosen by the combination giving the highest classification accuracy in average for all nine folds. The presented workflow could be generalized for an n-fold cross-validation approach, where n represents the number of plants in the training set.