Frozen LLM-Generated Preprocessing for Medical-Claims Adherence Classification: An Internal Model-Sensitivity Study
Downloads
Large language models (LLMs) can generate data-preprocessing code from data profiles, but their value relative to predefined expert workflows in clinical tabular classification remains unclear. This study evaluated whether frozen LLM-generated preprocessing matches a Manual Expert workflow for medication-adherence classification and identified the components responsible for performance differences. We analyzed 24,071 de-duplicated medical-claims records from 2022, comparing Manual Expert preprocessing against frozen code generated by DeepSeek, Claude Sonnet 4.6, GPT-5.4, and iterative CAAFE. Stateful transformations were fitted exclusively within training folds. Performance was assessed using repeated 5 × 10-fold cross-validation, a locked 20% holdout with 2,000 bootstrap samples, and Nadeau–Bengio-corrected equivalence testing. With LightGBM, all pipelines were equivalent in accuracy, Matthews correlation coefficient (MCC), and area under the receiver operating characteristic curve (AUC). Cross-validation accuracy ranged from 0.8204 to 0.8229, and every corrected 90% confidence interval remained within the prespecified ±0.01 equivalence margin; the widest interval extended from −0.0041 to 0.0009. Component ablation attributed the entire improvement over raw data to ratio features (+0.0018). Log1p transformations produced no improvement (+0.0000), whereas scaling slightly reduced accuracy (−0.0007), consistent with tree-based models’ insensitivity to monotonic transformations. Excluding the outcome-proximal variable UNITSTOTAL reduced holdout accuracy from 0.820 to 0.758 and AUC from 0.903 to 0.839, although pipeline equivalence persisted (accuracy span: 0.0018). However, equivalence depended on the estimator: naive Logistic Regression exhibited an accuracy span of 0.202, decreasing to 0.161 after uniform scaling and nested regularization tuning, with differences concentrated in CAAFE. Thus, frozen LLM-generated preprocessing can match expert-designed preprocessing for internal, tree-based medication-adherence classification. Gains primarily reflect feature construction rather than distributional adjustment. These findings also caution against assuming universal preprocessing superiority. Preprocessing strategies should therefore be evaluated jointly with downstream estimators, while claims-based prediction results require careful assessment of outcome-proximal information before being interpreted as genuine predictive performance.
[1] M. Naghavi et al., “Global burden of 288 causes of death and life expectancy decomposition in 204 countries and territories and 811 subnational locations, 1990–2021: a systematic analysis for the Global Burden of Disease Study 2021,” The Lancet, vol. 403, no. 10440, pp. 2100–2132, May 2024, doi: 10.1016/S0140-6736(24)00367-2.
[2] E. Malaya, A. Piątkowska, M. Panek, P. Kuna, M. Kupczyk, and G. Kardas, “Medication adherence in allergic diseases and asthma: a literature review,” Front. Pharmacol., vol. 15, Art. no. 1488665, Dec. 2024, doi: 10.3389/fphar.2024.1488665.
[3] A. Chantzaras and J. Yfantopoulos, “Determinants of medication adherence in patients with diabetes, hypertension, and hyperlipidemia,” Hormones, vol. 24, no. 2, pp. 443–459, Jun. 2025, doi: 10.1007/s42000-025-00631-9.
[4] A. J. Nelson, N. J. Pagidipati, and H. B. Bosworth, “Improving medication adherence in cardiovascular disease,” Nat. Rev. Cardiol., vol. 21, no. 6, pp. 417–429, Jun. 2024, doi: 10.1038/s41569-023-00972-1.
[5] R. Khera et al., “Use of Machine Learning Models to Predict Death After Acute Myocardial Infarction,” JAMA Cardiol., vol. 6, no. 6, p. 633, Jun. 2021, doi: 10.1001/jamacardio.2021.0122.
[6] M. K. Biddinika, A. Masitha, H. Herman, and V. A. N. Fatimah, “Machine Learning Techniques for Heart Disease Prediction Using a Multi-Algorithm Approach,” JUITA: Jurnal Informatika, vol. 12, no. 2, p. 149, Nov. 2024, doi: 10.30595/juita.v12i2.24153.
[7] V. Koesmahargyo et al., “Accuracy of machine learning-based prediction of medication adherence in clinical research,” Psychiatry Res., vol. 294, p. 113558, Dec. 2020, doi: 10.1016/j.psychres.2020.113558.
[8] K.-S. Kim, B. Kim, and K. Han, “Big Data Research for Diabetes-Related Diseases Using the Korean National Health Information Database,” Diabetes Metab. J., vol. 49, no. 1, pp. 13–21, Jan. 2025, doi: 10.4093/dmj.2024.0780.
[9] M. Li et al., “Development and assessment of novel machine learning models to predict medication non-adherence risks in type 2 diabetics,” Front. Public Health, vol. 10, Art. no. 1000622, Nov. 2022, doi: 10.3389/fpubh.2022.1000622.
[10] E. A. Kassaw, A. K. Sendekie, B. M. Enyew, and B. B. Abate, “Machine learning applications to classify and monitor medication adherence in patients with type 2 diabetes in Ethiopia,” Front. Endocrinol. (Lausanne)., vol. 16, Art. no. 1486350, Mar. 2025, doi: 10.3389/fendo.2025.1486350.
[11] M. Owusu-Adjei, J. Ben Hayfron-Acquah, F. Twum, and G. Abdul-Salaam, “Machine Learning Modeling of Disease Treatment Default: A Comparative Analysis of Classification Models,” Adv. Public Health, vol. 2023, pp. 1–11, Jan. 2023, doi: 10.1155/2023/4168770.
[12] M. D. Teja and G. M. Rayalu, “Optimizing heart disease diagnosis with advanced machine learning models: a comparison of predictive performance,” BMC Cardiovasc. Disord., vol. 25, no. 1, p. 212, Mar. 2025, doi: 10.1186/s12872-025-04627-6.
[13] K. Nabrdalik et al., “Machine Learning Predicts Cardiovascular Events in Patients With Diabetes: The Silesia Diabetes-Heart Project,” Curr. Probl. Cardiol., vol. 48, no. 7, p. 101694, Jul. 2023, doi: 10.1016/j.cpcardiol.2023.101694.
[14] A. Pfob, S.-C. Lu, and C. Sidey-Gibbons, “Machine learning in medicine: a practical introduction to techniques for data pre-processing, hyperparameter tuning, and model comparison,” BMC Med. Res. Methodol., vol. 22, no. 1, p. 282, Nov. 2022, doi: 10.1186/s12874-022-01758-8.
[15] W. Kanyongo and A. E. Ezugwu, “Machine learning approaches to medication adherence amongst NCD patients: A systematic literature review,” Inform. Med. Unlocked, vol. 38, p. 101210, 2023, doi: 10.1016/j.imu.2023.101210.
[16] W. Kanyongo, A. E. Ezugwu, T. Moyo, and J. V. Fonou Dombeu, “Machine learning-based classification of medication adherence among patients with noncommunicable diseases,” Inform. Med. Unlocked, vol. 52, p. 101611, 2025, doi: 10.1016/j.imu.2024.101611.
[17] W. Kanyongo, A. E.-S. Ezugwu, T. Moyo, and J. V. F. Dombeu, “Data Wrangling and Generation for Machine Learning Models in Medication Adherence Analytics: A practical Standpoint using Patient-Level and Medical Claims Data,” Data Intell., vol. 7, no. 2, pp. 485–526, Jun. 2025, doi: 10.3724/2096-7004.di.2024.0037.
[18] Y. Gu et al., “Predicting medication adherence using ensemble learning and deep learning models with large scale healthcare data,” Sci. Rep., vol. 11, no. 1, p. 18961, Sep. 2021, doi: 10.1038/s41598-021-98387-w.
[19] Y.-L. Chen, P.-A. Nguyen, C.-H. Chien, M.-H. Hsu, D.-M. Liou, and H.-C. Yang, “Machine learning-based prediction of medication refill adherence among first-time insulin users with type 2 diabetes,” Diabetes Res. Clin. Pract., vol. 207, p. 111033, Jan. 2024, doi: 10.1016/j.diabres.2023.111033.
[20] I. N. Abrar, M. K. Biddinika, and H. Yuliansyah, “Comparative Evaluation of Boosting Ensemble Models for Medication Adherence Prediction in Patients with Non-Communicable Diseases,” Jurnal Sisfokom (Sistem Informasi dan Komputer), vol. 15, no. 3, pp. 462–472, Jul. 2026, doi: 10.32736/sisfokom.v15i3.2712.
[21] N. Hollmann, S. Müller, and F. Hutter, “Large Language Models for Automated Data Science: Introducing CAAFE for Context-Aware Automated Feature Engineering,” in Advances in Neural Information Processing Systems 36, San Diego, California, USA: Neural Information Processing Systems Foundation, Inc. (NeurIPS), 2023, pp. 44753–44775. doi: 10.52202/075280-1938.
[22] H. Zhang, Y. Dong, C. Xiao, and M. Oyamada, “Jellyfish: Instruction-Tuning Local Large Language Models for Data Preprocessing,” in Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Stroudsburg, PA, USA: Association for Computational Linguistics, 2024, pp. 8754–8782. doi: 10.18653/v1/2024.emnlp-main.497.
[23] H.-J. Park, Y.-S. Koo, H.-Y. Yang, Y.-S. Han, and C.-S. Nam, “Study on Data Preprocessing for Machine Learning Based on Semiconductor Manufacturing Processes,” Sensors, vol. 24, no. 17, p. 5461, Aug. 2024, doi: 10.3390/s24175461.
[24] T. Emmanuel, T. Maupong, D. Mpoeleng, T. Semong, B. Mphago, and O. Tabona, “A survey on missing data in machine learning,” J. Big Data, vol. 8, no. 1, p. 140, Oct. 2021, doi: 10.1186/s40537-021-00516-9.
[25] K. Mahmud Sujon, R. Binti Hassan, Z. Tusnia Towshi, M. A. Othman, M. Abdus Samad, and K. Choi, “When to Use Standardization and Normalization: Empirical Evidence From Machine Learning Models and XAI,” IEEE Access, vol. 12, pp. 135300–135314, 2024, doi: 10.1109/ACCESS.2024.3462434.
[26] V. Singh, M. Pencina, A. J. Einstein, J. X. Liang, D. S. Berman, and P. Slomka, “Impact of train/test sample regimen on performance estimate stability of machine learning in cardiovascular imaging,” Sci. Rep., vol. 11, no. 1, p. 14490, Jul. 2021, doi: 10.1038/s41598-021-93651-5.
[27] W. Kanyongo, T. Moyo, A. E.-S. Ezugwu, and J. V. F. Dombeu, “Dataset for analysing medication adherence among diabetes and hypertension patients: Patient-level and medication refill data, Mendeley Data, Version 2, 2024, doi: 10.17632/zkp7sbbx64.2.
[28] N. Sambasivan, S. Kapania, H. Highfill, D. Akrong, P. Paritosh, and L. M. Aroyo, “‘Everyone wants to do the model work, not the data work’: Data Cascades in High-Stakes AI,” in Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems, New York, NY, USA: ACM, May 2021, pp. 1–15. doi: 10.1145/3411764.3445518.
[29] J. White et al., “A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT,” in Proceedings of the 30th Conference on Pattern Languages of Programs, in PLoP ’23. USA: The Hillside Group, 2023, Art. no. 5, pp. 1–31, doi: 10.64346/PLoP2023p05.
[30] P. Liu, W. Yuan, J. Fu, Z. Jiang, H. Hayashi, and G. Neubig, “Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing,” ACM Comput. Surv., vol. 55, no. 9, pp. 1–35, Sep. 2023, doi: 10.1145/3560815.
[31] G. E. P. Box and D. R. Cox, “An Analysis of Transformations,” J. R. Stat. Soc. Series B Stat. Methodol., vol. 26, no. 2, pp. 211–243, Jul. 1964, doi: 10.1111/j.2517-6161.1964.tb00553.x.
[32] M. Kuhn and K. Johnson, Feature Engineering and Selection. Boca Raton, FL: Chapman and Hall/CRC, 2019. doi: 10.1201/9781315108230.
[33] I.-K. Yeo, “A new family of power transformations to improve normality or symmetry,” Biometrika, vol. 87, no. 4, pp. 954–959, Dec. 2000, doi: 10.1093/biomet/87.4.954.
[34] F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.
[35] R. Shwartz-Ziv and A. Armon, “Tabular data: Deep learning is not all you need,” Information Fusion, vol. 81, pp. 84–90, May 2022, doi: 10.1016/j.inffus.2021.11.011.
[36] C. Bentéjac, A. Csörgő, and G. Martínez-Muñoz, “A comparative analysis of gradient boosting algorithms,” Artif. Intell. Rev., vol. 54, no. 3, pp. 1937–1967, Mar. 2021, doi: 10.1007/s10462-020-09896-5.
[37] T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, NY, USA: ACM, Aug. 2016, pp. 785–794. doi: 10.1145/2939672.2939785.
[38] E. Elgeldawi, A. Sayed, A. R. Galal, and A. M. Zaki, “Hyperparameter Tuning for Machine Learning Algorithms Used for Arabic Sentiment Analysis,” Informatics, vol. 8, no. 4, p. 79, Nov. 2021, doi: 10.3390/informatics8040079.
[39] M. Wojciuk, Z. Swiderska-Chadaj, K. Siwek, and A. Gertych, “Improving classification accuracy of fine-tuned CNN models: Impact of hyperparameter optimization,” Heliyon, vol. 10, no. 5, p. e26586, Mar. 2024, doi: 10.1016/j.heliyon.2024.e26586.
[40] S. Shekhar, A. Bansode, and A. Salim, “A Comparative study of Hyper-Parameter Optimization Tools,” in 2021 IEEE Asia-Pacific Conference on Computer Science and Data Engineering (CSDE), IEEE, Dec. 2021, pp. 1–6. doi: 10.1109/CSDE53843.2021.9718485.
[41] L. González-Castro, M. Chávez, P. Duflot, V. Bleret, G. Del Fiol, and M. López-Nores, “Impact of Hyperparameter Optimization to Enhance Machine Learning Performance: A Case Study on Breast Cancer Recurrence Prediction,” Applied Sciences, vol. 14, no. 13, p. 5909, Jul. 2024, doi: 10.3390/app14135909.
[42] T. Yang and Y. Ying, “AUC Maximization in the Era of Big Data and AI: A Survey,” ACM Comput. Surv., vol. 55, no. 8, pp. 1–37, Aug. 2023, doi: 10.1145/3554729.
[43] M. Cearns, T. Hahn, S. Clark, and B. T. Baune, “Machine learning probability calibration for high-risk clinical decision-making,” Australian & New Zealand Journal of Psychiatry, vol. 54, no. 2, pp. 123–126, Feb. 2020, doi: 10.1177/0004867419885448.
[44] S. M. Lundberg et al., “From local explanations to global understanding with explainable AI for trees,” Nat. Mach. Intell., vol. 2, no. 1, pp. 56–67, Jan. 2020, doi: 10.1038/s42256-019-0138-9.
[45] S. García, A. Fernández, J. Luengo, and F. Herrera, “Advanced nonparametric tests for multiple comparisons in the design of experiments in computational intelligence and data mining: Experimental analysis of power,” Inf. Sci. (N. Y)., vol. 180, no. 10, pp. 2044–2064, May 2010, doi: 10.1016/j.ins.2009.12.010.
[46] C. Nadeau and Y. Bengio, “Inference for the Generalization Error,” Mach. Learn., vol. 52, no. 3, pp. 239–281, Sep. 2003, doi: 10.1023/A:1024068626366.
[47] D. J. Schuirmann, “A comparison of the Two One-Sided Tests Procedure and the Power Approach for assessing the equivalence of average bioavailability,” J. Pharmacokinet. Biopharm., vol. 15, no. 6, pp. 657–680, Dec. 1987, doi: 10.1007/BF01068419.
[48] D. Lakens, “Equivalence Tests,” Soc. Psychol. Personal. Sci., vol. 8, no. 4, pp. 355–362, May 2017, doi: 10.1177/1948550617697177.
[49] F. Faul, E. Erdfelder, A. Buchner, and A.-G. Lang, “Statistical power analyses using G*Power 3.1: Tests for correlation and regression analyses,” Behav. Res. Methods, vol. 41, no. 4, pp. 1149–1160, Nov. 2009, doi: 10.3758/BRM.41.4.1149.
[50] M. Aickin and H. Gensler, “Adjusting for multiple testing when reporting research results: the Bonferroni vs Holm methods.,” Am. J. Public Health, vol. 86, no. 5, pp. 726–728, May 1996, doi: 10.2105/AJPH.86.5.726.
[51] B. Efron, “Better Bootstrap Confidence Intervals,” J. Am. Stat. Assoc., vol. 82, no. 397, pp. 171–185, Mar. 1987, doi: 10.1080/01621459.1987.10478410.
[52] T. Saito and M. Rehmsmeier, “The Precision-Recall Plot Is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets,” PLoS One, vol. 10, no. 3, p. e0118432, Mar. 2015, doi: 10.1371/journal.pone.0118432.
[53] D. Chicco and G. Jurman, “The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation,” BMC Genomics, vol. 21, no. 1, p. 6, Dec. 2020, doi: 10.1186/s12864-019-6413-7.
[54] K. Davagdorj, J. S. Lee, V. H. Pham, and K. H. Ryu, “A Comparative Analysis of Machine Learning Methods for Class Imbalance in a Smoking Cessation Intervention,” Applied Sciences, vol. 10, no. 9, p. 3307, May 2020, doi: 10.3390/app10093307.
[55] D. Lakens, “Calculating and reporting effect sizes to facilitate cumulative science: a practical primer for t-tests and ANOVAs,” Front. Psychol., vol. 4, Art. no. 863, 2013, doi: 10.3389/fpsyg.2013.00863.
[56] A. J. Vickers and E. B. Elkin, “Decision Curve Analysis: A Novel Method for Evaluating Prediction Models,” Medical Decision Making, vol. 26, no. 6, pp. 565–574, Nov. 2006, doi: 10.1177/0272989X06295361.
Copyright (c) 2026 Herman Yuliansyah, Ihya’ Nashirudin Abrar, Muhammad Kunta Biddinika (Author)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlikel 4.0 International (CC BY-SA 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).






