A6.1 Two Views of One Measurement
The chemometric analysis was carried out on two views of the same spectra, as requested: the integrals as recorded, and the chemically identified components derived from them. Each view was examined in two forms, one carrying the absolute scale that the TMS transfer now provides and one carrying composition only, because the amount of extract and its composition answer different questions and are confounded in different ways.
The integral data set, I_abs, contains the 21 sample windows W1–W21 of every spectrum expressed in millimoles of ¹H per kilogram of hop, that is, each normalized integral multiplied by the calibration factor of its bottle and divided by the sample mass. The TMS window W22 was excluded because it is equal to ten in every spectrum by construction, carries no information about the sample and would, if expressed per kilogram, reproduce only the bottle and the mass; the blank window W18 was retained deliberately as a control for noise and baseline artifacts. The compositional form, I_rel, expresses the same 21 windows per 100 units of the six major bitter-acid signals, the convention of v1.1, from which the amount of extract cancels. The component data set, Q_abs, contains the eight quantified constituents in % w/w, the three α-acid homologs, the three β-acid homologs (major plus minor tautomers), the myrcene-type diene and α-humulene, and Q_rel the same eight constituents as percentages of their sum. Negative humulene values were set to zero in Q_rel only, and the signals of Section A3.4 that are not bitter-acid tautomers, which are present in the integral data, have no counterpart in the component data. The four matrices are given in the companion workbook.
A6.2 Pretreatments
Pretreatment was treated as a question to be answered by the data rather than as a convention, as requested, although the PNA convention of mean-centering followed by Pareto scaling was taken as the reference. Six column scalings were compared, mean-centering alone (MC), autoscaling to unit variance (UV), Pareto scaling (division by the square root of the standard deviation), range scaling, level scaling (division by the mean) and variable stability (VAST) scaling (autoscaling multiplied by the inverse coefficient of variation),24–26 each without transformation, after a generalized logarithm with the transformation parameter set to the noise variance estimated from the blank window,27 and, for the component data, after the centered log-ratio transformation of compositional data analysis.28 Sixty combinations were evaluated in all.
Four criteria were used, none of which depends on the grouping that the analysis is meant to discover. The first is noise leverage, measured as the share of the total variance after pretreatment carried by the blank window W18; a pretreatment that gives a window containing no signal a large share of the variance will generate structure from noise. The second is the recovery of same-cultivar similarity, measured as the rank of the nearest sample of the same cultivar among the 48 others, for the seven cultivars represented by two or three samples in the same product form, and separately for the three pellet–Cryo pairs. The third is the separation of known classes, by silhouette width in the space of the first three principal components and by the balanced accuracy of a three-nearest-neighbor classifier under leave-one-cultivar-out validation with the pretreatment refitted in every fold. The fourth is an artifact check, the silhouette of the two solvent bottles among the S1 pellets, which should be close to zero.
A6.3 Methods
The unsupervised methods were PCA, with the number of components judged by element-wise k-fold cross-validation (Q²),29 the broken-stick rule and parallel analysis,30 and with Hotelling T² and the residual Q statistic with the limits of Jackson and Mudholkar;31,32 hierarchical cluster analysis by Ward's criterion on Euclidean distances,33 with the number of clusters guided by the silhouette width,34 the stability of each cluster measured by the mean Jaccard coefficient over 200 bootstrap resamplings35 and the agreement between partitions by the adjusted Rand index;36 k-means clustering as a check on the Ward partitions; and UMAP37 (8 neighbors, minimum distance 0.3) and t-SNE38 (perplexity 8, principal-component initialization) in two and three dimensions. The faithfulness of each low-dimensional map was measured by its trustworthiness,39 by the fraction of each sample's five nearest neighbors in the full pretreated data that remain among its five nearest neighbors in the map, and, for UMAP and t-SNE, by the agreement of the neighborhoods obtained with ten different random seeds, since both methods are known to distort global distances and to create apparent clusters.40,41
The supervised methods were PLS-DA,42,43 support vector machines with linear and radial-basis kernels,44 linear discriminant analysis with Ledoit–Wolf shrinkage of the covariance matrix,45 k-nearest neighbors, L2-regularized multinomial logistic regression, random forests46 and SIMCA class modeling,47 in which one principal component model is built for each class and a sample is assigned to the class to whose model it is nearest in the combined T²–Q distance. Four targets were modeled: the region of growth and the region in which the cultivar was bred (three classes each), the product form (Cryo or pellet), included as a positive control that should be easy on absolute data and hard on compositional data, and the trade classification of the cultivar as aroma, dual-purpose or bittering. Every model was assessed by leave-one-cultivar-out cross-validation, in which all samples of a cultivar are withheld together, so that the ten cultivars represented more than once cannot inform their own predictions; the 38 outer folds contained a grouped four-fold inner cross-validation in which the hyperparameters were tuned, and the pretreatment (mean-centering and Pareto scaling) was fitted on the training samples of each fold.48–50 Balanced accuracy, the mean of the class-wise recoveries, was used as the figure of merit because the classes are unequal in size; its chance level is 0.33 for three classes and 0.50 for two.
Significance was established by permutation. The class labels were permuted among cultivars, so that all samples of a cultivar kept a common label, and the entire nested procedure was repeated for each permutation, 100 times for PLS-DA on all four data sets and 50 times for the radial-basis SVM on the two integral data sets (100 times for the region of growth on I_abs); because the best of several models is an optimistic estimate, a further test permuted the labels and recorded, for each permutation, the best of five models (PLS-DA, LDA, k-nearest neighbors, logistic regression and SIMCA), 50 times. Baselines were computed with the same validation: the majority class, a model using the declared α-acid content alone, and models using only three chemical descriptors, the logarithm of the α/β ratio and the cohumulone and colupulone fractions, or only the first two of these; each baseline model was fitted by logistic regression, the radial-basis SVM and shrinkage LDA, and the best of the three is reported. Finally, two confounding checks were made: the prediction of the measurement set (S1 or S2) among the pellets and of the solvent bottle within S1, which ought to fail if the data are free of campaign artifacts, and the prediction of the geographic targets within S1 alone and within the pellets alone. The calculations were made in Python 3.11 with NumPy 2.4, SciPy 1.17, scikit-learn 1.851 and umap-learn 0.5, with all random seeds fixed.
References Cited in This Section
Numbered as in the full list on the References page.
