Process NMR Associates
PNA-WP-2026-HOPS-01-A1 · Section A6

A6. Design of the Chemometric Analysis

NMR Spectroscopy in the Analysis of Hops (Humulus lupulus L.) · Addendum A1: Direct qNMR and Chemometrics

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.

24.
van den Berg, R. A.; Hoefsloot, H. C. J.; Westerhuis, J. A.; Smilde, A. K.; van der Werf, M. J. Centering, scaling, and transformations: improving the biological information content of metabolomics data. BMC Genomics 2006, 7 (1), 142. https://doi.org/10.1186/1471-2164-7-142
25.
Keun, H. C.; Ebbels, T. M. D.; Antti, H.; Bollard, M. E.; Beckonert, O.; Holmes, E.; Lindon, J. C.; Nicholson, J. K. Improved analysis of multivariate data by variable stability scaling: application to NMR-based metabolic profiling. Anal. Chim. Acta 2003, 490 (1-2), 265–276. https://doi.org/10.1016/s0003-2670(03)00094-1
26.
Craig, A.; Cloarec, O.; Holmes, E.; Nicholson, J. K.; Lindon, J. C. Scaling and normalization effects in NMR spectroscopic metabonomic data sets. Anal. Chem. 2006, 78 (7), 2262–2267. https://doi.org/10.1021/ac0519312
27.
Parsons, H. M.; Ludwig, C.; Günther, U. L.; Viant, M. R. Improved classification accuracy in 1- and 2-dimensional NMR metabolomics data using the variance stabilising generalised logarithm transformation. BMC Bioinformatics 2007, 8 (1), 234. https://doi.org/10.1186/1471-2105-8-234
28.
Aitchison, J. The Statistical Analysis of Compositional Data. J. R. Stat. Soc. B 1982, 44 (2), 139–160. https://doi.org/10.1111/j.2517-6161.1982.tb01195.x
29.
Bro, R.; Kjeldahl, K.; Smilde, A. K.; Kiers, H. A. L. Cross-validation of component models: A critical look at current methods. Anal. Bioanal. Chem. 2008, 390 (5), 1241–1251. https://doi.org/10.1007/s00216-007-1790-1
30.
Jackson, D. A. Stopping Rules in Principal Components Analysis: A Comparison of Heuristical and Statistical Approaches. Ecology 1993, 74 (8), 2204–2214. https://doi.org/10.2307/1939574
31.
Jackson, J. E.; Mudholkar, G. S. Control Procedures for Residuals Associated With Principal Component Analysis. Technometrics 1979, 21 (3), 341–349. https://doi.org/10.1080/00401706.1979.10489779
32.
Jolliffe, I. T.; Cadima, J. Principal component analysis: a review and recent developments. Philos. Trans. R. Soc. A 2016, 374 (2065), 20150202. https://doi.org/10.1098/rsta.2015.0202
33.
Ward, J. H. Hierarchical Grouping to Optimize an Objective Function. J. Am. Stat. Assoc. 1963, 58 (301), 236–244. https://doi.org/10.1080/01621459.1963.10500845
34.
Rousseeuw, P. J. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 1987, 20, 53–65. https://doi.org/10.1016/0377-0427(87)90125-7
35.
Hennig, C. Cluster-wise assessment of cluster stability. Comput. Stat. Data Anal. 2007, 52 (1), 258–271. https://doi.org/10.1016/j.csda.2006.11.025
36.
Hubert, L.; Arabie, P. Comparing partitions. J. Classif. 1985, 2 (1), 193–218. https://doi.org/10.1007/bf01908075
37.
McInnes, L.; Healy, J.; Saul, N.; Großberger, L. UMAP: Uniform Manifold Approximation and Projection. J. Open Source Softw. 2018, 3 (29), 861. https://doi.org/10.21105/joss.00861
38.
van der Maaten, L.; Hinton, G. Visualizing data using t-SNE. J. Mach. Learn. Res. 2008, 9, 2579–2605. https://www.jmlr.org/papers/v9/vandermaaten08a.html
39.
Venna, J.; Kaski, S. Neighborhood preservation in nonlinear projection methods: an experimental study. In Artificial Neural Networks — ICANN 2001; Lecture Notes in Computer Science; Springer: Berlin, Heidelberg, 2001; pp 485–491. https://doi.org/10.1007/3-540-44668-0_68
40.
Kobak, D.; Berens, P. The art of using t-SNE for single-cell transcriptomics. Nat. Commun. 2019, 10 (1), 5416. https://doi.org/10.1038/s41467-019-13056-x
41.
Chari, T.; Pachter, L. The specious art of single-cell genomics. PLoS Comput. Biol. 2023, 19 (8), e1011288. https://doi.org/10.1371/journal.pcbi.1011288
42.
Barker, M.; Rayens, W. Partial least squares for discrimination. J. Chemom. 2003, 17 (3), 166–173. https://doi.org/10.1002/cem.785
43.
Brereton, R. G.; Lloyd, G. R. Partial least squares discriminant analysis: taking the magic away. J. Chemom. 2014, 28 (4), 213–225. https://doi.org/10.1002/cem.2609
44.
Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20 (3), 273–297. https://doi.org/10.1007/bf00994018
45.
Ledoit, O.; Wolf, M. A well-conditioned estimator for large-dimensional covariance matrices. J. Multivar. Anal. 2004, 88 (2), 365–411. https://doi.org/10.1016/s0047-259x(03)00096-4
46.
Breiman, L. Random Forests. Mach. Learn. 2001, 45 (1), 5–32. https://doi.org/10.1023/a:1010933404324
47.
Wold, S.; Sjöström, M. SIMCA: a method for analyzing chemical data in terms of similarity and analogy. In Chemometrics: Theory and Application; ACS Symposium Series 52; American Chemical Society: Washington, DC, 1977; pp 243–282. https://doi.org/10.1021/bk-1977-0052.ch012
48.
Varma, S.; Simon, R. Bias in error estimation when using cross-validation for model selection. BMC Bioinformatics 2006, 7 (1), 91. https://doi.org/10.1186/1471-2105-7-91
49.
Westerhuis, J. A.; Hoefsloot, H. C. J.; Smit, S.; Vis, D. J.; Smilde, A. K.; van Velzen, E. J. J.; van Duijnhoven, J. P. M.; van Dorsten, F. A. Assessment of PLSDA cross validation. Metabolomics 2008, 4 (1), 81–89. https://doi.org/10.1007/s11306-007-0099-6
50.
Szymańska, E.; Saccenti, E.; Smilde, A. K.; Westerhuis, J. A. Double-check: validation of diagnostic statistics for PLS-DA models in metabolomics studies. Metabolomics 2012, 8 (S1), 3–16. https://doi.org/10.1007/s11306-011-0330-3
51.
Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; Vanderplas, J.; Passos, A.; Cournapeau, D.; Brucher, M.; Perrot, M.; Duchesnay, É. Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. https://www.jmlr.org/papers/v12/pedregosa11a.html
Back to top