## 2 Materials and Methods
### Multivariate Statistical Analysis  
Principal component analysis (PCA) and hierarchical agglomerative cluster analysis (HCA) were applied to the morpho-agronomic data. PCA [42] allows for representing multivariate information in a low-dimensionality space defined by a relatively small number of uncorrelated principal components (PCs). PCs are obtained using an orthogonal transformation of the original data in such a way that the first is oriented along the direction of maximum variance and the successive PCs in turn explain the greatest fraction of residual variance under the constraint of mutual orthogonality between the components. Transformation of the original data matrix \(\mathbf{X}\) is mathematically described by Equation (1):  
\[\mathbf{X}=\mathbf{T}\mathbf{P}^{\mathrm{T}}+\mathbf{E}, \tag{1}\]  
where the columns of matrix \(\mathbf{P}\) (loadings matrix) define the PC directions, the columns of matrix \(\mathbf{T}\) (scores matrix) are the coordinates of the samples in the PC space, and the error matrix \(\mathbf{E}\) collects the residuals associated with the approximation of the original data when fewer PCs than the original number of variables are extracted. Usually, the scores are graphically projected onto the two- or three-dimensional space of the most significant components (score plots), which allows for a straightforward visualization of the trends within the data samples, such as clustering, retaining most of the original information. The loadings can be also plotted (loading plot) in the compressed PC subspace to visualize the relationships between the original variables and the relative weight of each variable in the selected PCs.  
In HCA [43], single objects are gradually connected to each other in groups according to similarity, which is inversely related to the distance between objects. The final sequence of merges is graphically represented in a dendrogram, with the vertical axis showing the similarity measure at which each successive object joins a group. In this work, the usual Euclidean distance was selected to compute the similarity and the average linkage method was the clustering algorithm.  
The classification of potato varieties was attempted using partial least squares discriminant analysis (PLS-DA). PLS-DA [44; 45] takes its origin from partial least squares regression, which allows one to link a matrix **X** (i.e., raw experimental data) with a multi-response matrix **Y** (PLS-2 regression) and overcome limitations related with an ill-conditionate covariance matrix (as in the case of a greater number of X variables than the objects). The regression model is built by iteratively extracting latent variables from X factors and Y responses (also referred to as X-scores and Y-scores, respectively). The extracted X-scores are used to predict the Y-scores, and indirectly, the model responses. In classification problems, the model response is categorized via the generation of a dummy binary **Y** matrix in which 1 and 0 indicates the \"in-group\" and \"out-group\" samples, respectively. After the regression model has been built using a calibration data set, the calibration or even external samples are classified according to the computed or predicted outputs. However, the PLS-DA responses are continuous and not binary, and therefore a threshold must be defined to assign the objects; the value 0.5 was used in this work. The optimal number of latent variables in the PLS-DA model was determined using leave-one-out cross-validation. Multivariate statistical analyses were run in Matlab (version 2015b, The Mathworks, Natick, MA, USA) using in-house routines.