Skip to content

frizchar/length-of-stay-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 

Repository files navigation

Length-of-stay prediction

Overview

We predict the length-of-stay (LOS) of hospital inpatients.
The problem is treated as a classification problem using the xgboost algorithm and considering the following two classes:

  • class 1 = '1 or 2 days'
  • class 2 = '3+ days'

→ LOS = 1 ( class 1 = '1 or 2 days' ) is considered when admission date = release date.
→ LOS = 2 ( class 1 = '1 or 2 days' ) is considered when admission date = release date + 1 day.
→ LOS = 3 ( class 2 = '3+ days' ) is considered when admission date = release date + 2 days.
etc.

The code is written in Python.

Folder structure

  • folder evaluate includes the evaluation code
  • folder deploy includes the deployment code

Dependencies

The required packages are included in file requirements.txt.
Python interpreter version used for this project: 3.9.4

Predictors

  1. sex : categorical variable := sex of patient
  2. family : categorical variable := family status id of patient
  3. ter : categorical variable := prefecture id of patient's residence
  4. wayin : categorical variable := type of patient's admission
  5. asfal1 : categorical variable := id of patient's 1st health insurance
  6. has_asfal2 : categorical variable := boolean flag on whether the patient has 2nd health insurance or not
  7. has_asfal3 : categorical variable := boolean flag on whether the patient has 3rd health insurance or not
  8. icd10groupid : categorical variable := id of ICD10 group assigned to patient on admission
  9. specialty : categorical variable := id of the doctor's specialty
  10. weekday : numerical variable := day of week (0,1,..6) on admission
  11. hh24 : numerical variable := hour of day (00,01,02,...,23) on admission
  12. age : numerical variable := patient age on admission day

About

predicts length-of-stay of hospital inpatients

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages