Submitted:
26 November 2025
Posted:
28 November 2025
You are already at the latest version
Abstract
This study explores the pedagogical integration of Large Language Models (LLMs) into chemistry education through a practical chemometrics activity using the Wisconsin Diagnostic Breast Cancer (WDBC) dataset. Graduate students employed Microsoft 365 Copilot (GPT-5) and Gemini to perform statistical analyses, dimensionality reduction, and classification tasks entirely via natural language prompts. The exercise covered exploratory data visualization, normality assessment, log transformation, Principal Component Analysis (PCA), and Partial Least Squares Discriminant Analysis (PLS-DA). Students compared raw and log-transformed datasets to investigate how preprocessing affected multivariate discrimination and predictive accuracy. Both LLMs generated reproducible results consistent with Jamovi software outputs and produced publication-quality plots including score, loading, VIP, and confusion matrix diagrams. Beyond technical proficiency, the activity enhanced students’ conceptual understanding of supervised and unsupervised learning while promoting critical evaluation of generative AI outputs. The findings demonstrate that LLMs can serve as accessible, interactive tools for teaching machine learning and chemometric analysis, lowering programming barriers and fostering data literacy.

Keywords:
1. Introduction
Unsupervised Methods
Supervised Methods
Data Processing
Methods
Overview
Results and Discussion
Checking Data Normality and Comparing Variables
Building Histograms
Building Box Plots
Principal Component Analysis (PCA)
Partial Least Squares Discriminant Analysis (PLS-DA)
Students’ Assessment

Conclusion
Supplementary Materials
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| I | Artificial Intelligence |
| ATR-FTIR | Attenuated Total Reflectance – Fourier Transform Infrared Spectroscopy |
| CAPES | Coordenação de Aperfeiçoamento de Pessoal de Nível Superior |
| CSV | Comma-Separated Values |
| DOCX | Microsoft Word Open XML Document |
| FAPESC | Fundação de Amparo à Pesquisa e Inovação do Estado de Santa Catarina |
| FN | False Negative |
| FP | False Positive |
| FURB | Universidade Regional de Blumenau |
| GPT | Generative Pre-trained Transformer |
| GUI | Graphical User Interface |
| JAMOVI | Jamovi Statistical Software |
| KDE | Kernel Density Estimate |
| LLMs | Large Language Models |
| LV | Latent Variable |
| PC | Principal Component |
| PCA | Principal Component Analysis |
| PLS | Partial Least Squares |
| PLS-DA / PLSDA | Partial Least Squares – Discriminant Analysis |
| RAW | Unprocessed (Raw) Dataset |
| SC | Santa Catarina (Brazil) |
| UCI | University of California, Irvine (Machine Learning Repository) |
| VIP | Variable Importance in Projection |
| WBCD / WDBC | Wisconsin Breast Cancer Dataset / Wisconsin Diagnostic Breast Cancer Dataset |
References
- Sequeira, C.A.; Borges, E.M. Enhancing Statistical Education in Chemistry and STEAM Using JAMOVI. Part 2. Comparing Dependent Groups and Principal Component Analysis (PCA). J Chem Educ 2024, 101, 5040–5049. [Google Scholar] [CrossRef]
- de Souza, R.S.; Sequeira, C.A.; Borges, E.M. Enhancing Statistical Education in Chemistry and STEAM Using JAMOVI. Part 1: Descriptive Statistics and Comparing Independent Groups. J Chem Educ 2024. [CrossRef]
- Sidou, L.F.; Borges, E.M. Teaching Principal Component Analysis Using a Free and Open Source Software Program and Exercises Applying PCA to Real-World Examples. J Chem Educ 2020, 97, 1666–1676. [Google Scholar] [CrossRef]
- Mahjour, B.; McGrath, A.; Outlaw, A.; Zhao, R.; Zhang, C.; Cernak, T. Interactive Python Notebook Modules for Chemoinformatics in Medicinal Chemistry. J Chem Educ 2023, 100, 4895–4902. [Google Scholar] [CrossRef]
- Menke, E.J. Series of Jupyter Notebooks Using Python for an Analytical Chemistry Course. J Chem Educ 2020, 97, 3899–3903. [Google Scholar] [CrossRef]
- Lafuente, D.; Cohen, B.; Fiorini, G.; García, A.A.; Bringas, M.; Morzan, E.; Onna, D. A Gentle Introduction to Machine Learning for Chemists: An Undergraduate Workshop Using Python Notebooks for Visualization, Data Processing, Analysis, and Modeling. J Chem Educ 2021, 98, 2892–2898. [Google Scholar] [CrossRef]
- Wise, B.M. Teaching Chemometrics in Short Course Format. J Chemom 2022, 36, e3399. [Google Scholar] [CrossRef]
- Heras-Domingo, J.; Garay-Ruiz, D. Pythonic Chemistry: The Beginner’s Guide to Digital Chemistry. J Chem Educ 2024, 101, 4883–4891. [Google Scholar] [CrossRef]
- Saldivar-González, F.I.; Prado-Romero, D.L.; Cedillo-González, R.; Chávez-Hernández, A.L.; Avellaneda-Tamayo, J.F.; Gómez-García, A.; Juárez-Rivera, L.; Medina-Franco, J.L. A Spanish Chemoinformatics GitBook for Chemical Data Retrieval and Analysis Using Python Programming. J Chem Educ 2024, 101, 2549–2554. [Google Scholar] [CrossRef]
- Hupp, A.M.; Kovarik, M.L.; McCurry, D.A. Emerging Areas in Undergraduate Analytical Chemistry Education: Microfluidics, Microcontrollers, and Chemometrics. Annual Review of Analytical Chemistry 2024, 17, 197–219. [Google Scholar] [CrossRef] [PubMed]
- Kim, S.-Y.; Jeon, I.; Kang, S.-J. Integrating Data Science and Machine Learning to Chemistry Education: Predicting Classification and Boiling Point of Compounds. J Chem Educ 2024, 101, 1771–1776. [Google Scholar] [CrossRef]
- Hagg, A.; Kirschner, K.N. Open-Source Machine Learning in Computational Chemistry. J Chem Inf Model 2023, 63, 4505–4532. [Google Scholar] [CrossRef]
- Thrall, E.S.; Lee, S.E.; Schrier, J.; Zhao, Y. Machine Learning for Functional Group Identification in Vibrational Spectroscopy: A Pedagogical Lab for Undergraduate Chemistry Students. J Chem Educ 2021, 98, 3269–3276. [Google Scholar] [CrossRef]
- Cahill, S.T.; Young, J.E.B.; Howe, M.; Clark, R.; Worrall, A.F.; Stewart, M.I. Assignment of Regioisomers Using Infrared Spectroscopy: A Python Coding Exercise in Data Processing and Machine Learning. J Chem Educ 2024, 101, 2925–2932. [Google Scholar] [CrossRef]
- Grant St James, A.; Hand, L.; Mills, T.; Song, L.; S. J. Brunt, A.; E. Bergstrom Mann, P.; F. Worrall, A.; I. Stewart, M.; Vallance, C. Exploring Machine Learning in Chemistry through the Classification of Spectra: An Undergraduate Project. J Chem Educ 2023, 100, 1343–1350. [Google Scholar] [CrossRef]
- Amrihesari, M.; Brettmann, B. Introducing Data-Driven Materials Informatics into Undergraduate Courses through a Polymer Science Workshop. J Chem Educ 2025. [Google Scholar] [CrossRef]
- Dumancas, G.G.; Carreto, N.; Generalao, O.; Ke, G.; Bello, G.; Lubguban, A.; Malaluan, R. Chemometrics for Quantitative Determination of Terpenes Using Attenuated Total Reflectance–Fourier Transform Infrared Spectroscopy: A Pedagogical Laboratory Exercise for Undergraduate Instrumental Analysis Students. J Chem Educ 2023. [Google Scholar] [CrossRef]
- Nunes, C.A.; Alvarenga, V.O.; de Souza Sant’Ana, A.; Santos, J.S.; Granato, D. The Use of Statistical Software in Food Science and Technology: Advantages, Limitations and Misuses. Food Research International 2015, 75, 270–280. [Google Scholar] [CrossRef]
- Granato, D.; Santos, J.S.; Escher, G.B.; Ferreira, B.L.; Maggio, R.M. Use of Principal Component Analysis (PCA) and Hierarchical Cluster Analysis (HCA) for Multivariate Association between Bioactive Compounds and Functional Properties in Foods: A Critical Perspective. Trends Food Sci Technol 2018, 72, 83–90. [Google Scholar] [CrossRef]
- Zielinski, A.A.F.; Haminiuk, C.W.I.; Nunes, C.A.; Schnitzler, E.; van Ruth, S.M.; Granato, D. Chemical Composition, Sensory Properties, Provenance, and Bioactivity of Fruit Juices as Assessed by Chemometrics: A Critical Review and Guideline. Compr Rev Food Sci Food Saf 2014, 13, 300–316. [Google Scholar] [CrossRef]
- Lackey, H.E.; Sell, R.L.; Nelson, G.L.; Bryan, T.A.; Lines, A.M.; Bryan, S.A. Practical Guide to Chemometric Analysis of Optical Spectroscopic Data. J Chem Educ 2023, 100, 2608–2626. [Google Scholar] [CrossRef]
- Bro, R.; Smilde, A.K. Principal Component Analysis. Anal. Methods 2014, 6, 2812–2831. [Google Scholar] [CrossRef]
- Yeh, T.-S. Open-Source Visual Programming Software for Introducing Principal Component Analysis to the Analytical Curriculum. J Chem Educ 2025, 102, 1428–1435. [Google Scholar] [CrossRef]
- Hameed Alsaedi, N.R.; Akay, M.F. Effective Breast Cancer Classification Using Deep MLP, Feature-Fused Autoencoder and Weight-Tuned Decision Tree. Applied Sciences 2025, 15, 7213. [Google Scholar] [CrossRef]
- Dubey, A.K.; Gupta, U.; Jain, S. Analysis of K-Means Clustering Approach on the Breast Cancer Wisconsin Dataset. Int J Comput Assist Radiol Surg 2016, 11, 2033–2047. [Google Scholar] [CrossRef]
- Gurcan, F.; Soylu, A. Learning from Imbalanced Data: Integration of Advanced Resampling Techniques and Machine Learning Models for Enhanced Cancer Diagnosis and Prognosis. Cancers (Basel) 2024, 16, 3417. [Google Scholar] [CrossRef]
- Hameed Alsaedi, N.R.; Akay, M.F. Effective Breast Cancer Classification Using Deep MLP, Feature-Fused Autoencoder and Weight-Tuned Decision Tree. Applied Sciences 2025, 15, 7213. [Google Scholar] [CrossRef]
- Sequeira, C.A.; de Souza Júnior, R.S.; Borges, E.M. A STEAM-Based Laboratory Approach: Evaluating Vitamin C Content with Multiple Titration and Statistical Methods. J Chem Educ 2025, 102, 3018–3026. [Google Scholar] [CrossRef]
- Malschitzky, M.E.T.; Sequeira, C.A.; Borges, E.M. Innovative 96-Well Plate Imaging for Quantifying Hydrogen Peroxide in Cow’s Milk: A Practical Teaching Tool for Analytical Chemistry. J Chem Educ 2025, 102, 1651–1661. [Google Scholar] [CrossRef]
- Deucher, N.C.; Silva de Souza, R.; Borges, E.M. Teaching Precipitation Titration Methods: A Statistical Comparison of Mohr, Fajans, and Volhard Techniques. J Chem Educ 2025, 102, 364–371. [Google Scholar] [CrossRef]
- Borges, E.M. Hypothesis Tests and Exploratory Analysis Using R Commander and Factoshiny. J Chem Educ 2023, 100, 267–278. [Google Scholar] [CrossRef]
- Marcel Borges, E. Data Visualization Using Boxplots: Comparison of Metalloid, Metal, and Nonmetal Chemical and Physical Properties. J Chem Educ 2023, 100, 2809–2817. [Google Scholar] [CrossRef]
- Chiarelli, J.; St. Hilaire, M.A.; Baldock, B.L.; Franco, J.; Theberge, S.; Fernandez, A.L. Calculating the Precision of Student-Generated Datasets Using RStudio. J Chem Educ 2025, 102, 909–916. [CrossRef]
- Ferreira, J.E. V.; Miranda, R.M.; Figueiredo, A.F.; Barbosa, J.P.; Brasil, E.M. Box-and-Whisker Plots Applied to Food Chemistry. J Chem Educ 2016, 93, 2026–2032. [Google Scholar] [CrossRef]
- Pérez-Arribas, L.V.; León-González, M.E.; Rosales-Conrado, N. Learning Principal Component Analysis by Using Data from Air Quality Networks. J Chem Educ 2017, 94, 458–464. [Google Scholar] [CrossRef]
- Xu, L.; Bai, Z.; Li, H.; Chen, D.D.Y. Instrumental Analysis Experiment: Direct Surface Analysis of Personal Protective Equipment. J Chem Educ 2025, 102, 1258–1266. [Google Scholar] [CrossRef]
- Pereira de Quental, A.G.; Firmino do Nascimento, A.L.; de Lelis Medeiros de Morais, C.; de Oliveira Neves, A.C.; Seixas das Neves, L.; Gomes de Lima, K.M. Periodic Table’s Properties Using Unsupervised Chemometric Methods: Undergraduate Analytical Chemistry Laboratory Exercise. J Chem Educ 2025, 102, 1237–1244. [Google Scholar] [CrossRef]
- Shao, L. Teaching Principal Component Analysis in the Course of Analytical Chemistry: A Q&A Based Heuristic Approach. J Chem Educ 2025, 102, 155–163. [Google Scholar] [CrossRef]
- Zeng, L.; Huang, M.; Shi, C.; Wang, C.; Zhang, J.; Peng, Y.; Zheng, Y.; Wang, S.; Hong, J.; Gao, Y.; et al. Transgenerational Aging Induced by Tris(1,3-Dichloro-2-Propyl)Phosphate via Disruption of Lipid Homeostasis and Mitochondrial Function. Environ Sci Technol Lett 2025. [Google Scholar] [CrossRef]
- Ben, S.; Zheng, Q.; Zhao, Y.; Xia, J.; Mu, W.; Yao, M.; Yan, B.; Jiang, Q. Tear Fluid-Based Metabolomics Profiling in Chronic Dacryocystitis Patients. J Proteome Res 2025, 24, 224–233. [Google Scholar] [CrossRef]
- Van, Q.N.; Issaq, H.J.; Jiang, Q.; Li, Q.; Muschik, G.M.; Waybright, T.J.; Lou, H.; Dean, M.; Uitto, J.; Veenstra, T.D. Comparison of 1D and 2D NMR Spectroscopy for Metabolic Profiling. J Proteome Res 2008, 7, 630–639. [Google Scholar] [CrossRef]
- Yuriev, E.; Orgill, M.; Holme, T. Generative AI in Chemistry Education: Current Progress, Pedagogical Values, and the Challenge of Rapid Evolution. J Chem Educ 2025, 102, 3773–3776. [Google Scholar] [CrossRef]
- Clark, T.M.; Anderson, E.; Dickson-Karn, N.M.; Soltanirad, C.; Tafini, N. Comparing the Performance of College Chemistry Students with ChatGPT for Calculations Involving Acids and Bases. J Chem Educ 2023, 100, 3934–3944. [Google Scholar] [CrossRef]
- Schrier, J. Comment on “Comparing the Performance of College Chemistry Students with ChatGPT for Calculations Involving Acids and Bases. ” J Chem Educ 2024, 101, 1782–1784. [Google Scholar] [CrossRef]
- Mirza, A.; Alampara, N.; Kunchapu, S.; Ríos-García, M.; Emoekabu, B.; Krishnan, A.; Gupta, T.; Schilling-Wilhelmi, M.; Okereke, M.; Aneesh, A.; et al. A Framework for Evaluating the Chemical Knowledge and Reasoning Abilities of Large Language Models against the Expertise of Chemists. Nat Chem 2025, 17, 1027–1034. [Google Scholar] [CrossRef] [PubMed]
- Sigot, M.; Tassoti, S. An Investigation of Change in Prompting Strategies in a Semester-Long Course on the Use of GenAI. J Chem Educ 2025, 102, 2507–2513. [Google Scholar] [CrossRef]
- Young, J.D.; Dawood, L.; Lewis, S.E. Chemistry Students’ Artificial Intelligence Literacy through Their Critical Reflections of Chatbot Responses. J Chem Educ 2024, 101, 2466–2474. [Google Scholar] [CrossRef]











| Number | Content | Questions |
| 1. | Data normality checking | Perform a normality test for each variable and report the results |
| 2. | Hypothesis tests | Compare all variables between Malignant and Benign groups using appropriate statistical tests. |
| 3. | Histograms | Generate grouped histograms comparing the mean fractal dimension, symmetry error, and worst perimeter, stratified by diagnosis (Malignant vs. Benign). show (KDE) curves |
| 4. | Histograms | Apply log transformations and generate grouped histograms comparing the mean fractal dimension, symmetry error, and worst perimeter, stratified by diagnosis (Malignant vs. Benign). show (KDE) curves |
| 5. | Box plots | Generate box plots comparing the mean fractal dimension, symmetry error, and worst perimeter, stratified by diagnosis (Malignant vs. Benign). |
| 6. | Box plots | Apply log transformations and generate box plots comparing the mean fractal dimension, symmetry error, and worst perimeter, stratified by diagnosis (Malignant vs. Benign). |
| 7. | PCA | Build the PCA score plot for the raw data, ensure data scaling |
| 8. | PCA | Build the PCA score plot |
| 9. | PCA | Build the PCA score plot for log transformed data |
| 10. | PCA | In this case, what are the main differences observed between the PCA results obtained using the raw data and those obtained using the log-transformed data? |
| 11. | PLS-DA | Perform PLS-DA on both the raw and log-transformed datasets, ensuring autoscaling (mean-centering and unit variance scaling) is applied before model construction, and visualize the resulting score plots. |
| 12. | PLS-DA | Compare the PLS-DA score plots obtained from the raw and log-transformed datasets, with autoscaling applied to each prior to analysis. |
| 13. | PLS-DA | Construct VIP score plots for the PLS-DA models derived from both the raw and log-transformed datasets. Autoscaling (mean-centering and unit variance scaling) should be applied before model construction to ensure comparability, and the resulting variable importance profiles should be visualized. |
| 14. | PLS-DA | Explain the concepts of True Positive (TP), True Negative (TN), False Positive (FP), False Negative (FN), Accuracy, Sensitivity, Specificity, and Precision in the context of the Wisconsin Breast Cancer Dataset. |
| 15. | PLS-DA | Construct the confusion matrix using 5-fold cross-validation for both the raw and log-transformed datasets, employing two latent variables (LVs) in each PLS-DA model. Compare the classification performance between the two preprocessing approaches. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).