EconPapers    
Economics at your fingertips  
 

A modular and interpretable framework for tabular data analysis using LLaMA 7B: Enhancing preprocessing, modeling, and explainability with local language models

Shahab Ahmad Al Maaytah and Ayman Qahmash

PLOS ONE, 2026, vol. 21, issue 2, 1-32

Abstract: Predicting whether a patient will attend a scheduled medical appointment is essential for reducing inefficiencies in healthcare systems and optimizing resource allocation. This study introduces a local, LLM-assisted pipeline that uses LLaMA 7B solely to automate semantic preprocessing such as column renaming, datatype inference, and cleaning recommendations while the predictive task is performed by classical machine-learning models. Applied to the Medical Appointment No-Shows dataset, the pipeline spans dataset analysis, feature transformation, classification, SHAP-based explainability, and system profiling. Using LLM-guided preprocessing, the downstream XGBoost classifier achieved an overall accuracy of 80%, with an F1-score of 0.89 for the majority Show class and 0.03 for the minority No-show class, reflecting the strong class imbalance in the dataset. The AUC-ROC reached 0.65 and the precision–recall AUC was 0.87, driven primarily by majority-class performance. SHAP analysis identified waiting days, age, and SMS notifications as the most influential predictors. Overall, the results demonstrate that local large language models can enhance preprocessing and interpretability within an efficient, deployable workflow for tabular prediction tasks, while classical supervised models remain responsible for final prediction.

Date: 2026
References: Add references at CitEc
Citations:

Downloads: (external link)
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0341002 (text/html)
https://journals.plos.org/plosone/article/file?id= ... 41002&type=printable (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:plo:pone00:0341002

DOI: 10.1371/journal.pone.0341002

Access Statistics for this article

More articles in PLOS ONE from Public Library of Science
Bibliographic data for series maintained by plosone ().

 
Page updated 2026-02-15
Handle: RePEc:plo:pone00:0341002