Modelos de aprendizaje automático para la predicción de extensión del periodo de hospitalización en pacientes cardiacos.
Loading...
Date
2026
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Universidad de Concepción
Abstract
El tiempo de estancia hospitalaria constituye un indicador clave para la gestión clínica, al estar directamente asociado al uso de recursos, los costos de atención y la calidad asistencial. En el contexto de las enfermedades cardiovasculares (una de las principales causas de hospitalización en población adulta mayor), la predicción temprana de estancias hospitalarias prolongadas resulta especialmente relevante para la planificación de camas y la optimización de la atención en sistemas de salud.
Esta Memoria de Título tiene como objetivo desarrollar y evaluar un enfoque metodológico para la predicción de estancias hospitalarias prolongadas en pacientes cardíacos, utilizando datos del Cardiovascular Health Study (CHS). El conjunto de datos integra información demográfica, signos vitales, resultados de laboratorio y el historial clínico del paciente, incluyendo códigos de diagnóstico y procedimientos codificados según el estándar CIE-9.
La metodología propuesta se estructura en varias etapas. En primer lugar, se realiza la preparación del set de datos y la definición de la variable objetivo Length of Stay (LOS), formulando el problema como una tarea de clasificación binaria. Posteriormente, se implementa un pipeline de preprocesamiento diferenciado para variables numéricas y categóricas, incorporando técnicas de imputación múltiple, tratamiento de valores extremos, transformaciones de distribución y estandarización. Para abordar la alta dimensionalidad de los códigos clínicos, se propone un modelado basado en tópicos latentes mediante factorización de matrices no negativas (NMF), que permite condensar la historia clínica del paciente en un conjunto reducido de variables interpretables. Adicionalmente, se diseñan variables derivadas orientadas a capturar la carga diagnóstica y la recurrencia hospitalaria.
El entrenamiento de los modelos se realiza mediante una comparación de distintos modelos de aprendizaje supervisado, utilizando validación cruzada estratificada y el F1-score como métrica principal. A partir de esta etapa, se selecciona y se optimiza un modelo XGBoost mediante una búsqueda aleatoria de hiperparámetros, cuyo desempeño final se evalúa sobre un conjunto de prueba independiente, obteniendo un valor AUC de 0,78 y exactitud de 0,74. El análisis se complementó con técnicas de interpretabilidad basadas en la importancia de características y valores SHAP.
The Length of hospital stay is a key indicator in clinical management, as it is directly associated with resource utilization, healthcare costs, and quality of care. In the context of cardiovascular diseases (one of the leading causes of hospitalization among the older adult population), early prediction of prolonged hospital stays is particularly relevant for bed capacity planning and optimization of healthcare delivery. This project aims to develop and evaluate a method for predicting prolonged hospital stays in cardiac patients using the Cardiovascular Health Study (CHS) dataset. CHS integrates demographic information, vital signs, laboratory results, and patients’ clinical histories, including diagnosis and procedure codes encoded according to the ICD-9 standard. The proposed methodology is structured in several stages. First, the dataset is prepared, and the target variable, Length of Stay (LOS), was defined, thereby formulating the problem as a binary classification task. Subsequently, a differentiated preprocessing pipeline was implemented for numerical and categorical variables. These pipelines incorporated multiple imputation techniques, outlier handling, distribution transformations, and standardization depending on the variable being preprocessed. The high dimensionality of clinical codes was addressed by using a latent topic modeling approach based on non-negative matrix factorization (NMF). NMF enabled patients’ clinical histories to be summarized into a reduced set of interpretable variables. Additionally, derived features are designed to capture the diagnostic burden and recurrence of hospitalization. The models are trained by comparing different supervised learning models, using stratified cross-validation and the F1-score as the main metric. From this stage, an XGBoost model is selected and optimized through a random search of hyperparameters, with its final performance evaluated on an independent test set, yielding an AUC value of 0.78 and an accuracy of 0.74. The analysis was complemented with interpretability techniques based on feature importance and SHAP values.
The Length of hospital stay is a key indicator in clinical management, as it is directly associated with resource utilization, healthcare costs, and quality of care. In the context of cardiovascular diseases (one of the leading causes of hospitalization among the older adult population), early prediction of prolonged hospital stays is particularly relevant for bed capacity planning and optimization of healthcare delivery. This project aims to develop and evaluate a method for predicting prolonged hospital stays in cardiac patients using the Cardiovascular Health Study (CHS) dataset. CHS integrates demographic information, vital signs, laboratory results, and patients’ clinical histories, including diagnosis and procedure codes encoded according to the ICD-9 standard. The proposed methodology is structured in several stages. First, the dataset is prepared, and the target variable, Length of Stay (LOS), was defined, thereby formulating the problem as a binary classification task. Subsequently, a differentiated preprocessing pipeline was implemented for numerical and categorical variables. These pipelines incorporated multiple imputation techniques, outlier handling, distribution transformations, and standardization depending on the variable being preprocessed. The high dimensionality of clinical codes was addressed by using a latent topic modeling approach based on non-negative matrix factorization (NMF). NMF enabled patients’ clinical histories to be summarized into a reduced set of interpretable variables. Additionally, derived features are designed to capture the diagnostic burden and recurrence of hospitalization. The models are trained by comparing different supervised learning models, using stratified cross-validation and the F1-score as the main metric. From this stage, an XGBoost model is selected and optimized through a random search of hyperparameters, with its final performance evaluated on an independent test set, yielding an AUC value of 0.78 and an accuracy of 0.74. The analysis was complemented with interpretability techniques based on feature importance and SHAP values.
Description
Tesis presentada para optar al título de Ingeniero/a Civil Biomédico/a.
Keywords
Cardíacos, Enfermedades cardiovasculares, Hospitalización, Algoritmos Procesamiento de datos