Morales Sánchez, RodrigoMontalvo Herranz, SotoRiaño Martínez, AdriánMartínez Unanue, RaquelVelasco Arribas, Maria2025-02-062025-02-062024Rodrigo Morales-Sánchez, Soto Montalvo, Adrián Riaño, Raquel Martínez, María Velasco, Early diagnosis of HIV cases by means of text mining and machine learning models on clinical notes, Computers in Biology and Medicine, Volume 179, 2024, 108830, ISSN 0010-4825, https://doi.org/10.1016/j.compbiomed.2024.1088300010-4825https://doi.org/10.1016/j.compbiomed.2024.108830https://hdl.handle.net/20.500.14468/25841The registered version of this article, first published in “Computers in Biology and Medicine, Volume 179, 2024", is available online at the publisher's website: Elsevier, https://doi.org/10.1016/j.compbiomed.2024.108830 La versión registrada de este artículo, publicado por primera vez en “Computers in Biology and Medicine, Volume 179, 2024", está disponible en línea en el sitio web del editor: Elsevier, https://doi.org/10.1016/j.compbiomed.2024.108830Undiagnosed and untreated human immunodeficiency virus (HIV) infection increases morbidity in the HIV-positive person and allows onward transmission of the virus. Minimizing missed opportunities for HIV diagnosis when a patient visits a healthcare facility is essential in restraining the epidemic and working toward its eventual elimination. Most state-of-the-art proposals employ machine learning (ML) methods and structured data to enhance HIV diagnoses, however, there is a dearth of recent proposals utilizing unstructured textual data from Electronic Health Records (EHRs). In this work, we propose to use only the unstructured text of the clinical notes as evidence for the classification of patients as suspected or not suspected. For this purpose, we first compile a dataset of real clinical notes from a hospital with patients classified as suspects and non-suspects of having HIV. Then, we evaluate the effectiveness of two types of classification models to identify patients suspected of being infected with the virus: classical ML algorithms and two Large Language Models (LLMs) from the biomedical domain in Spanish. The results show that both LLMs outperform classical ML algorithms in the two settings we explore: one dataset version is balanced, containing an equal number of suspicious and non-suspicious patients, while the other reflects the real distribution of patients in the hospital, being unbalanced. We obtain F score figures of 94.7 with both LLMs in the unbalanced setting, while in the balance one, RoBERTa model outperforms the other one with a F score of 95.7. The findings indicate that leveraging unstructured text with LLMs in the biomedical domain yields promising outcomes in diminishing missed opportunities for HIV diagnosis. A tool based on our system could assist a doctor in deciding whether a patient in consultation should undergo a serological test.eninfo:eu-repo/semantics/openAccess12 Matemáticas::1203 Ciencia de los ordenadores ::1203.17 InformáticaEarly diagnosis of HIV cases by means of text mining and machine learning models on clinical notesartículoHIVText miningAutomated screeningElectronic Health Records (EHRs)Large Language Models (LLMs)Machine Learning (ML)