Purpose: To predict with high accuracy, using machine learning, if the length of stay of Covid-19 patients will be short or not, based on the basic clinical parameters.
Method: Seven primary variables, including age, gender, length of stay, c-reactive protein, ferritin, lymphocyte, and the COVID-19 Reporting and Data System (CORADS), were scanned and analyzed for 118 adult patients hospitalized with the diagnosis of Covid-19 between November 2020 and January 2021. Randomly, the data set is split into a training set of 80% and a test set of 20%. Using the caret package of the R programming language, machine learning models attempted to predict whether the length of stay was short or long, and the performance values of these models were recorded.
Results: Among the models, the k-nearest neighbor model produced the best results. According to this model, the following were the estimation performance results for hospitalizations of 5 days or less or more than 5 days: The accuracy rate was 0.92 (95% CI, 0.73-0.99), the no-information rate was 0.67, the Kappa rate was 0.82, and the F1 score was 0.89 (p=0.0048).
Conclusion: By applying machine learning into Covid-19, length of stay estimations may be made more accurately, providing for more effective patient management.