https://www.kaggle.com/S%C3%ADrio-Libanes/covid19
In total there are 54 features, expanded when pertinent to the mean, median, max, min, diff and relative diff.
The data is already scaled.
The goal of this notebook is to develop a ML model to predict if a patient of confirmed COVID-19 case will require admission to the ICU.
#IF WORKING ON JUPITER NOTEBOOK
#import os
#os.chdir("C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/4.ML - Machine Learning/Assessments/ML Individual Project")
#IF WORKING ON GOOGLE COLAB
from google.colab import drive
drive.mount('/content/drive')
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
#setting working directory
%cd'/content/drive/MyDrive/ML/BM_IndividualAssig'
/content/drive/MyDrive/ML/BM_IndividualAssig
import pandas as pd
import numpy as np
#visualisation
import matplotlib.pyplot as plt
import seaborn as sns
#???? this wasnt used
from sklearn.feature_selection import SelectFromModel
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split, cross_validate, GridSearchCV #?
from sklearn.preprocessing import LabelEncoder
# Machine Learning Models
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import SVC
# Stratified validation
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_validate
from sklearn.model_selection import RepeatedStratifiedKFold
# Evaluation metrics
from sklearn.metrics import accuracy_score
from sklearn.metrics import plot_confusion_matrix
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
import missingno as msno
%matplotlib inline
# Load our dataset
data = pd.read_excel('Kaggle_Sirio_Libanes_ICU_Prediction.xlsx')
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)
#check dimension of data
print('Rows: {} | Columns: {}'.format(data.shape[0], data.shape[1]))
Rows: 1925 | Columns: 231
data.head(10)
PATIENT_VISIT_IDENTIFIER | AGE_ABOVE65 | AGE_PERCENTIL | GENDER | DISEASE GROUPING 1 | DISEASE GROUPING 2 | DISEASE GROUPING 3 | DISEASE GROUPING 4 | DISEASE GROUPING 5 | DISEASE GROUPING 6 | HTN | IMMUNOCOMPROMISED | OTHER | ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | WINDOW | ICU | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.086420 | -0.230769 | -0.283019 | -0.593220 | -0.285714 | 0.736842 | 0.086420 | -0.230769 | -0.283019 | -0.586207 | -0.285714 | 0.736842 | 0.237113 | 0.0000 | -0.162393 | -0.500000 | 0.208791 | 0.898990 | -0.247863 | -0.459459 | -0.432836 | -0.636364 | -0.420290 | 0.736842 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 0-2 | 0 |
1 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.333333 | -0.230769 | -0.132075 | -0.593220 | 0.535714 | 0.578947 | 0.333333 | -0.230769 | -0.132075 | -0.586207 | 0.535714 | 0.578947 | 0.443299 | 0.0000 | -0.025641 | -0.500000 | 0.714286 | 0.838384 | -0.076923 | -0.459459 | -0.313433 | -0.636364 | 0.246377 | 0.578947 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 2-4 | 0 |
2 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.183673 | 0.183673 | 0.183673 | 0.183673 | -1.0 | -0.868365 | -0.868365 | -0.868365 | -0.868365 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.945093 | -0.945093 | -0.945093 | -0.945093 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.090147 | 0.090147 | 0.090147 | 0.090147 | -1.0 | 0.109756 | 0.109756 | 0.109756 | 0.109756 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.835844 | -0.835844 | -0.835844 | -0.835844 | -1.0 | -0.914938 | -0.914938 | -0.914938 | -0.914938 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.875236 | -0.875236 | -0.875236 | -0.875236 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.540721 | -0.540721 | -0.540721 | -0.540721 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.997201 | -0.997201 | -0.997201 | -0.997201 | -1.0 | -0.990854 | -0.990854 | -0.990854 | -0.990854 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.994912 | -0.994912 | -0.994912 | -0.994912 | -1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 4-6 | 0 |
3 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | -0.107143 | 0.736842 | NaN | NaN | NaN | NaN | -0.107143 | 0.736842 | NaN | NaN | NaN | NaN | 0.318681 | 0.898990 | NaN | NaN | NaN | NaN | -0.275362 | 0.736842 | NaN | NaN | NaN | NaN | -1.000000 | -1.000000 | NaN | NaN | NaN | NaN | -1.000000 | -1.000000 | 6-12 | 0 |
4 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | -1.0 | -0.871658 | -0.871658 | -0.871658 | -0.871658 | -1.0 | -0.863874 | -0.863874 | -0.863874 | -0.863874 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.414634 | -0.414634 | -0.414634 | -0.414634 | -1.0 | -0.979069 | -0.979069 | -0.979069 | -0.979069 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.326531 | 0.326531 | 0.326531 | 0.326531 | -1.0 | -0.926398 | -0.926398 | -0.926398 | -0.926398 | -1.0 | -0.859275 | -0.859275 | -0.859275 | -0.859275 | -1.0 | -0.669393 | -0.669393 | -0.669393 | -0.669393 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.320755 | -0.320755 | -0.320755 | -0.320755 | -1.0 | -0.353659 | -0.353659 | -0.353659 | -0.353659 | -1.0 | -0.979925 | -0.979925 | -0.979925 | -0.979925 | -1.0 | -0.963023 | -0.963023 | -0.963023 | -0.963023 | -1.0 | -0.762843 | -0.762843 | -0.762843 | -0.762843 | -1.0 | -0.643154 | -0.643154 | -0.643154 | -0.643154 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.365854 | -0.365854 | -0.365854 | -0.365854 | -1.0 | -0.230769 | -0.230769 | -0.230769 | -0.230769 | -1.0 | -0.875862 | -0.875862 | -0.875862 | -0.875862 | -1.0 | -0.815951 | -0.815951 | -0.815951 | -0.815951 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.574468 | 0.574468 | 0.574468 | 0.574468 | -1.0 | 0.393939 | 0.393939 | 0.393939 | 0.393939 | -1.0 | -0.471295 | -0.471295 | -0.471295 | -0.471295 | -1.0 | -0.666667 | -0.666667 | -0.666667 | -0.666667 | -1.0 | 0.848485 | 0.848485 | 0.848485 | 0.848485 | -1.0 | 0.925926 | 0.925926 | 0.925926 | 0.925926 | -1.0 | 0.142857 | 0.142857 | 0.142857 | 0.142857 | -1.0 | -0.999067 | -0.999067 | -0.999067 | -0.999067 | -1.0 | -0.983994 | -0.983994 | -0.983994 | -0.983994 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.996762 | -0.996762 | -0.996762 | -0.996762 | -1.0 | -0.243021 | -0.338537 | -0.213031 | -0.317859 | 0.033779 | 0.665932 | -0.283951 | -0.376923 | -0.188679 | -0.379310 | 0.035714 | 0.631579 | -0.340206 | -0.4875 | -0.572650 | -0.857143 | 0.098901 | 0.797980 | -0.076923 | 0.286486 | 0.298507 | 0.272727 | 0.362319 | 0.947368 | -0.339130 | 0.325153 | 0.114504 | 0.176471 | -0.238095 | -0.818182 | -0.389967 | 0.407558 | -0.230462 | 0.096774 | -0.242282 | -0.814433 | ABOVE_12 | 1 |
5 | 1 | 1 | 90th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | -0.283951 | -0.046154 | 0.188679 | 0.830508 | -0.107143 | 1.000000 | -0.283951 | -0.046154 | 0.188679 | 0.862069 | -0.107143 | 1.000000 | -0.072165 | 0.1500 | 0.264957 | 1.000000 | 0.318681 | 1.000000 | -0.504274 | -0.329730 | -0.059701 | 0.636364 | -0.275362 | 1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 0-2 | 1 |
6 | 1 | 1 | 90th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 1.0 | -0.210526 | -0.210526 | -0.210526 | -0.210526 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.219512 | -0.219512 | -0.219512 | -0.219512 | -1.0 | -0.967556 | -0.967556 | -0.967556 | -0.967556 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.530612 | 0.530612 | 0.530612 | 0.530612 | -1.0 | -0.615004 | -0.615004 | -0.615004 | -0.615004 | -1.0 | -0.769723 | -0.769723 | -0.769723 | -0.769723 | -1.0 | -0.982477 | -0.982477 | -0.982477 | -0.982477 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.870021 | -0.870021 | -0.870021 | -0.870021 | -1.0 | -0.914634 | -0.914634 | -0.914634 | -0.914634 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.523754 | -0.523754 | -0.523754 | -0.523754 | -1.0 | -0.858921 | -0.858921 | -0.858921 | -0.858921 | -1.0 | -0.557023 | -0.557023 | -0.557023 | -0.557023 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.496933 | -0.496933 | -0.496933 | -0.496933 | -1.0 | -0.834405 | -0.834405 | -0.834405 | -0.834405 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | -0.060606 | -0.060606 | -0.060606 | -0.060606 | -1.0 | -0.636849 | -0.636849 | -0.636849 | -0.636849 | -1.0 | -0.629630 | -0.629630 | -0.629630 | -0.629630 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.257143 | -0.257143 | -0.257143 | -0.257143 | -1.0 | -0.997014 | -0.997014 | -0.997014 | -0.997014 | -1.0 | -0.993902 | -0.993902 | -0.993902 | -0.993902 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.561446 | -0.561446 | -0.561446 | -0.561446 | -1.0 | -0.978029 | -0.978029 | -0.978029 | -0.978029 | -1.0 | -0.407407 | 0.892308 | -0.226415 | -0.389831 | -0.107143 | 0.894737 | -0.407407 | 0.892308 | -0.226415 | -0.379310 | -0.107143 | 0.894737 | -0.175258 | 0.9125 | -0.111111 | -0.285714 | 0.318681 | 0.959596 | -0.589744 | 0.329730 | -0.388060 | -0.454545 | -0.275362 | 0.894737 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 2-4 | 1 |
7 | 1 | 1 | 90th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | -0.407407 | 0.600000 | -0.358491 | -0.457627 | -0.035714 | 1.000000 | -0.407407 | 0.600000 | -0.358491 | -0.448276 | -0.035714 | 1.000000 | -0.175258 | 0.6750 | -0.230769 | -0.357143 | 0.362637 | 1.000000 | -0.589744 | 0.124324 | -0.492537 | -0.515152 | -0.217391 | 1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 4-6 | 1 |
8 | 1 | 1 | 90th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -0.839572 | -0.839572 | -0.839572 | -0.839572 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.219512 | -0.219512 | -0.219512 | -0.219512 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.367347 | 0.367347 | 0.367347 | 0.367347 | -1.0 | -0.908402 | -0.908402 | -0.908402 | -0.908402 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.002096 | -0.002096 | -0.002096 | -0.002096 | -1.0 | 0.019956 | 0.019956 | 0.019956 | 0.019956 | -1.0 | -0.987453 | -0.987453 | -0.987453 | -0.987453 | -1.0 | -0.975795 | -0.975795 | -0.975795 | -0.975795 | -1.0 | -0.735033 | -0.735033 | -0.735033 | -0.735033 | -1.0 | -0.614108 | -0.614108 | -0.614108 | -0.614108 | -1.0 | -0.812839 | -0.812839 | -0.812839 | -0.812839 | -1.0 | -0.012195 | -0.012195 | -0.012195 | -0.012195 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.696552 | -0.696552 | -0.696552 | -0.696552 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.982231 | -0.982231 | -0.982231 | -0.982231 | -1.0 | 0.148936 | 0.148936 | 0.148936 | 0.148936 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.228304 | -0.228304 | -0.228304 | -0.228304 | -1.0 | -0.740741 | -0.740741 | -0.740741 | -0.740741 | -1.0 | 0.969697 | 0.969697 | 0.969697 | 0.969697 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.066667 | 0.066667 | 0.066667 | 0.066667 | -1.0 | -0.995428 | -0.995428 | -0.995428 | -0.995428 | -1.0 | -0.986662 | -0.986662 | -0.986662 | -0.986662 | -1.0 | -0.634877 | -0.634877 | -0.634877 | -0.634877 | -1.0 | -0.879518 | -0.879518 | -0.879518 | -0.879518 | -1.0 | -0.943723 | -0.943723 | -0.943723 | -0.943723 | -1.0 | -0.456790 | 0.532308 | -0.384906 | -0.145763 | 0.114286 | 1.000000 | -0.506173 | 0.630769 | -0.358491 | -0.103448 | 0.142857 | 1.000000 | -0.257732 | 0.4750 | -0.299145 | -0.142857 | 0.406593 | 1.000000 | -0.572650 | 0.167568 | -0.477612 | -0.090909 | -0.014493 | 1.000000 | -0.913043 | -0.754601 | -0.923664 | -0.764706 | -0.880952 | -1.000000 | -0.906832 | -0.831132 | -0.940967 | -0.817204 | -0.882574 | -1.000000 | 6-12 | 1 |
9 | 1 | 1 | 90th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 | 1.0 | 1.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -0.914439 | -0.914439 | -0.914439 | -0.914439 | -1.0 | -0.916230 | -0.916230 | -0.916230 | -0.916230 | -1.0 | -0.268293 | -0.268293 | -0.268293 | -0.268293 | -1.0 | -0.268293 | -0.268293 | -0.268293 | -0.268293 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.530612 | 0.530612 | 0.530612 | 0.530612 | -1.0 | -0.435244 | -0.435244 | -0.435244 | -0.435244 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.685535 | -0.685535 | -0.685535 | -0.685535 | -1.0 | -0.719512 | -0.719512 | -0.719512 | -0.719512 | -1.0 | -0.972396 | -0.972396 | -0.972396 | -0.972396 | -1.0 | -0.975884 | -0.975884 | -0.975884 | -0.975884 | -1.0 | -0.703360 | -0.703360 | -0.703360 | -0.703360 | -1.0 | -0.717842 | -0.717842 | -0.717842 | -0.717842 | -1.0 | -0.777911 | -0.777911 | -0.777911 | -0.777911 | -1.0 | 0.341463 | 0.341463 | 0.341463 | 0.341463 | -1.0 | -0.573964 | -0.573964 | -0.573964 | -0.573964 | -1.0 | -0.806897 | -0.806897 | -0.806897 | -0.806897 | -1.0 | -0.742331 | -0.742331 | -0.742331 | -0.742331 | -1.0 | -0.949338 | -0.949338 | -0.949338 | -0.949338 | -1.0 | 0.361702 | 0.361702 | 0.361702 | 0.361702 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.300401 | -0.300401 | -0.300401 | -0.300401 | -1.0 | -0.185185 | -0.185185 | -0.185185 | -0.185185 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 0.580247 | 0.580247 | 0.580247 | 0.580247 | -1.0 | -0.314286 | -0.314286 | -0.314286 | -0.314286 | -1.0 | -0.995428 | -0.995428 | -0.995428 | -0.995428 | -1.0 | -0.986662 | -0.986662 | -0.986662 | -0.986662 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.460241 | -0.460241 | -0.460241 | -0.460241 | -1.0 | -0.978029 | -0.978029 | -0.978029 | -0.978029 | -1.0 | -0.178122 | 0.212601 | -0.141163 | -0.380216 | 0.010915 | 0.841977 | -0.185185 | 0.184615 | -0.169811 | -0.379310 | 0.000000 | 0.842105 | -0.587629 | -0.3250 | -0.572650 | -1.000000 | 0.010989 | 0.797980 | 0.555556 | 0.556757 | 0.298507 | 0.757576 | 0.710145 | 1.000000 | 0.513043 | 0.472393 | 0.114504 | 0.764706 | 0.142857 | -0.797980 | 0.315690 | 0.200359 | -0.239515 | 0.645161 | 0.139709 | -0.802317 | ABOVE_12 | 1 |
Obs:
The data has been anonymised regarding the disseases. So, we have disease goups from 1 to 6 but we do not know which specific disease it is.
Just from a quick glace at our data, in the first 10 rows, we can already see that there are a lot of NaN values in our dataset.
data.tail()
PATIENT_VISIT_IDENTIFIER | AGE_ABOVE65 | AGE_PERCENTIL | GENDER | DISEASE GROUPING 1 | DISEASE GROUPING 2 | DISEASE GROUPING 3 | DISEASE GROUPING 4 | DISEASE GROUPING 5 | DISEASE GROUPING 6 | HTN | IMMUNOCOMPROMISED | OTHER | ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | WINDOW | ICU | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1920 | 384 | 0 | 50th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.012346 | -0.292308 | 0.056604 | -0.525424 | 0.535714 | 0.789474 | 0.012346 | -0.292308 | 0.056604 | -0.517241 | 0.535714 | 0.789474 | 0.175258 | -0.050 | 0.145299 | -0.428571 | 0.714286 | 0.919192 | -0.299145 | -0.502703 | -0.164179 | -0.575758 | 0.246377 | 0.789474 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 0-2 | 0 |
1921 | 384 | 0 | 50th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -0.717277 | -0.717277 | -0.717277 | -0.717277 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.982208 | -0.982208 | -0.982208 | -0.982208 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.244898 | 0.244898 | 0.244898 | 0.244898 | -1.0 | -0.934890 | -0.934890 | -0.934890 | -0.934890 | -1.0 | -0.782516 | -0.782516 | -0.782516 | -0.782516 | -1.0 | -0.960280 | -0.960280 | -0.960280 | -0.960280 | -1.0 | -0.862197 | -0.862197 | -0.862197 | -0.862197 | -1.0 | -0.064990 | -0.064990 | -0.064990 | -0.064990 | -1.0 | -0.158537 | -0.158537 | -0.158537 | -0.158537 | -1.0 | -0.957340 | -0.957340 | -0.957340 | -0.957340 | -1.0 | -0.897773 | -0.897773 | -0.897773 | -0.897773 | -1.0 | -0.848590 | -0.848590 | -0.848590 | -0.848590 | -1.0 | -0.686722 | -0.686722 | -0.686722 | -0.686722 | -1.0 | -0.913165 | -0.913165 | -0.913165 | -0.913165 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.857988 | -0.857988 | -0.857988 | -0.857988 | -1.0 | -0.77931 | -0.77931 | -0.77931 | -0.77931 | -1.0 | -0.730061 | -0.730061 | -0.730061 | -0.730061 | -1.0 | -0.906238 | -0.906238 | -0.906238 | -0.906238 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.424242 | 0.424242 | 0.424242 | 0.424242 | -1.0 | -0.479306 | -0.479306 | -0.479306 | -0.479306 | -1.0 | -0.333333 | -0.333333 | -0.333333 | -0.333333 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | -0.333333 | -0.333333 | -0.333333 | -0.333333 | -1.0 | -0.085714 | -0.085714 | -0.085714 | -0.085714 | -1.0 | -0.997387 | -0.997387 | -0.997387 | -0.997387 | -1.0 | -0.992378 | -0.992378 | -0.992378 | -0.992378 | -1.0 | -0.869210 | -0.869210 | -0.869210 | -0.869210 | -1.0 | -0.879518 | -0.879518 | -0.879518 | -0.879518 | -1.0 | -0.979571 | -0.979571 | -0.979571 | -0.979571 | -1.0 | 0.086420 | -0.384615 | -0.113208 | -0.593220 | 0.142857 | 0.578947 | 0.086420 | -0.384615 | -0.113208 | -0.586207 | 0.142857 | 0.578947 | 0.237113 | -0.125 | -0.008547 | -0.500000 | 0.472527 | 0.838384 | -0.247863 | -0.567568 | -0.298507 | -0.636364 | -0.072464 | 0.578947 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 2-4 | 0 |
1922 | 384 | 0 | 50th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.086420 | -0.230769 | -0.169811 | -0.593220 | 0.142857 | 0.736842 | 0.086420 | -0.230769 | -0.169811 | -0.586207 | 0.142857 | 0.736842 | 0.237113 | 0.000 | -0.059829 | -0.500000 | 0.472527 | 0.898990 | -0.247863 | -0.459459 | -0.343284 | -0.636364 | -0.072464 | 0.736842 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 4-6 | 0 |
1923 | 384 | 0 | 50th | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.209877 | -0.384615 | -0.188679 | -0.661017 | 0.285714 | 0.473684 | 0.209877 | -0.384615 | -0.188679 | -0.655172 | 0.285714 | 0.473684 | 0.340206 | -0.125 | -0.076923 | -0.571429 | 0.560440 | 0.797980 | -0.162393 | -0.567568 | -0.358209 | -0.696970 | 0.043478 | 0.473684 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 6-12 | 0 |
1924 | 384 | 0 | 50th | 1 | 0.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.983255 | -0.983255 | -0.983255 | -0.983255 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.306122 | 0.306122 | 0.306122 | 0.306122 | -1.0 | -0.944798 | -0.944798 | -0.944798 | -0.944798 | -1.0 | -0.825160 | -0.825160 | -0.825160 | -0.825160 | -1.0 | -0.962617 | -0.962617 | -0.962617 | -0.962617 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.157233 | -0.157233 | -0.157233 | -0.157233 | -1.0 | -0.292683 | -0.292683 | -0.292683 | -0.292683 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.850521 | -0.850521 | -0.850521 | -0.850521 | -1.0 | -0.634855 | -0.634855 | -0.634855 | -0.634855 | -1.0 | -0.935974 | -0.935974 | -0.935974 | -0.935974 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.77931 | -0.77931 | -0.77931 | -0.77931 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.801134 | -0.801134 | -0.801134 | -0.801134 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.463284 | -0.463284 | -0.463284 | -0.463284 | -1.0 | -0.444444 | -0.444444 | -0.444444 | -0.444444 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.200000 | 0.200000 | 0.200000 | 0.200000 | -1.0 | -0.997761 | -0.997761 | -0.997761 | -0.997761 | -1.0 | -0.991997 | -0.991997 | -0.991997 | -0.991997 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.807229 | -0.807229 | -0.807229 | -0.807229 | -1.0 | -0.888448 | -0.888448 | -0.888448 | -0.888448 | -1.0 | -0.185185 | -0.539103 | -0.107704 | -0.610169 | 0.050595 | 0.662281 | -0.160494 | -0.538462 | -0.075472 | -0.586207 | 0.071429 | 0.631579 | -0.175258 | -0.375 | -0.247863 | -0.785714 | 0.186813 | 0.777778 | -0.247863 | -0.470270 | -0.149254 | -0.515152 | 0.101449 | 0.842105 | -0.652174 | -0.644172 | -0.633588 | -0.647059 | -0.547619 | -0.838384 | -0.701863 | -0.585967 | -0.763868 | -0.612903 | -0.551337 | -0.835052 | ABOVE_12 | 0 |
#Looking at statistics about our data
data.describe()
PATIENT_VISIT_IDENTIFIER | AGE_ABOVE65 | GENDER | DISEASE GROUPING 1 | DISEASE GROUPING 2 | DISEASE GROUPING 3 | DISEASE GROUPING 4 | DISEASE GROUPING 5 | DISEASE GROUPING 6 | HTN | IMMUNOCOMPROMISED | OTHER | ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | ICU | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
count | 1925.000000 | 1925.000000 | 1925.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1925.000000 |
mean | 192.000000 | 0.467532 | 0.368831 | 0.108333 | 0.028125 | 0.097917 | 0.019792 | 0.128125 | 0.046875 | 0.213021 | 0.158333 | 0.809896 | 0.528527 | 0.528527 | 0.528527 | 0.528527 | -1.0 | -0.963433 | -0.963433 | -0.963433 | -0.963433 | -1.0 | -0.931121 | -0.931121 | -0.931121 | -0.931121 | -1.0 | -0.310924 | -0.310924 | -0.310924 | -0.310924 | -1.0 | -0.311845 | -0.311845 | -0.311845 | -0.311845 | -1.0 | -0.945928 | -0.945928 | -0.945928 | -0.945928 | -1.0 | -0.994424 | -0.994424 | -0.994424 | -0.994424 | -1.0 | 0.330359 | 0.330359 | 0.330359 | 0.330359 | -1.0 | -0.891078 | -0.891078 | -0.891078 | -0.891078 | -1.0 | -0.723217 | -0.723217 | -0.723217 | -0.723217 | -1.0 | -0.920403 | -0.920403 | -0.920403 | -0.920403 | -1.0 | -0.861694 | -0.861694 | -0.861694 | -0.861694 | -1.0 | -0.160818 | -0.160818 | -0.160818 | -0.160818 | -1.0 | -0.202472 | -0.202472 | -0.202472 | -0.202472 | -1.0 | -0.936950 | -0.936950 | -0.936950 | -0.936950 | -1.0 | 0.267131 | 0.267131 | 0.267131 | 0.267131 | -1.0 | -0.741266 | -0.741266 | -0.741266 | -0.741266 | -1.0 | -0.710390 | -0.710390 | -0.710390 | -0.710390 | -1.0 | -0.812662 | -0.812662 | -0.812662 | -0.812662 | -1.0 | -0.175886 | -0.175886 | -0.175886 | -0.175886 | -1.0 | -0.675342 | -0.675342 | -0.675342 | -0.675342 | -1.0 | -0.777664 | -0.777664 | -0.777664 | -0.777664 | -1.0 | -0.755797 | -0.755797 | -0.755797 | -0.755797 | -1.0 | -0.845570 | -0.845570 | -0.845570 | -0.845570 | -1.0 | 0.236997 | 0.236997 | 0.236997 | 0.236997 | -1.0 | 0.369007 | 0.369007 | 0.369007 | 0.369007 | -1.0 | -0.414479 | -0.414479 | -0.414479 | -0.414479 | -1.0 | -0.525624 | -0.525624 | -0.525624 | -0.525624 | -1.0 | 0.914277 | 0.914277 | 0.914277 | 0.914277 | -1.0 | 0.331965 | 0.331965 | 0.331965 | 0.331965 | -1.0 | -0.053060 | -0.053060 | -0.053060 | -0.053060 | -1.0 | -0.991054 | -0.991054 | -0.991054 | -0.991054 | -1.0 | -0.982156 | -0.982156 | -0.982156 | -0.982156 | -1.0 | -0.822280 | -0.822280 | -0.822280 | -0.822280 | -1.0 | -0.830181 | -0.830181 | -0.830181 | -0.830181 | -1.0 | -0.954177 | -0.954177 | -0.954177 | -0.954177 | -1.0 | -0.093631 | -0.332600 | -0.264701 | -0.438754 | 0.066893 | 0.743077 | -0.097790 | -0.338468 | -0.268632 | -0.435121 | 0.063798 | 0.748588 | -0.040855 | -0.207812 | -0.264999 | -0.483129 | 0.326823 | 0.817565 | -0.235001 | -0.399582 | -0.282029 | -0.316753 | 0.014964 | 0.818593 | -0.752454 | -0.728053 | -0.754100 | -0.703683 | -0.770338 | -0.887196 | -0.786997 | -0.715950 | -0.817800 | -0.719147 | -0.771327 | -0.886982 | 0.267532 |
std | 111.168431 | 0.499074 | 0.482613 | 0.310882 | 0.165373 | 0.297279 | 0.139320 | 0.334316 | 0.211426 | 0.409549 | 0.365148 | 0.392485 | 0.224100 | 0.224100 | 0.224100 | 0.224100 | 0.0 | 0.160870 | 0.160870 | 0.160870 | 0.160870 | 0.0 | 0.169509 | 0.169509 | 0.169509 | 0.169509 | 0.0 | 0.100256 | 0.100256 | 0.100256 | 0.100256 | 0.0 | 0.118812 | 0.118812 | 0.118812 | 0.118812 | 0.0 | 0.076610 | 0.076610 | 0.076610 | 0.076610 | 0.0 | 0.098000 | 0.098000 | 0.098000 | 0.098000 | 0.0 | 0.126224 | 0.126224 | 0.126224 | 0.126224 | 0.0 | 0.115901 | 0.115901 | 0.115901 | 0.115901 | 0.0 | 0.171244 | 0.171244 | 0.171244 | 0.171244 | 0.0 | 0.152341 | 0.152341 | 0.152341 | 0.152341 | 0.0 | 0.115752 | 0.115752 | 0.115752 | 0.115752 | 0.0 | 0.238530 | 0.238530 | 0.238530 | 0.238530 | 0.0 | 0.253605 | 0.253605 | 0.253605 | 0.253605 | 0.0 | 0.086125 | 0.086125 | 0.086125 | 0.086125 | 0.0 | 0.923557 | 0.923557 | 0.923557 | 0.923557 | 0.0 | 0.149095 | 0.149095 | 0.149095 | 0.149095 | 0.0 | 0.167796 | 0.167796 | 0.167796 | 0.167796 | 0.0 | 0.146085 | 0.146085 | 0.146085 | 0.146085 | 0.0 | 0.158109 | 0.158109 | 0.158109 | 0.158109 | 0.0 | 0.152190 | 0.152190 | 0.152190 | 0.152190 | 0.0 | 0.073097 | 0.073097 | 0.073097 | 0.073097 | 0.0 | 0.095193 | 0.095193 | 0.095193 | 0.095193 | 0.0 | 0.245238 | 0.245238 | 0.245238 | 0.245238 | 0.0 | 0.129574 | 0.129574 | 0.129574 | 0.129574 | 0.0 | 0.130906 | 0.130906 | 0.130906 | 0.130906 | 0.0 | 0.273767 | 0.273767 | 0.273767 | 0.273767 | 0.0 | 0.188882 | 0.188882 | 0.188882 | 0.188882 | 0.0 | 0.149537 | 0.149537 | 0.149537 | 0.149537 | 0.0 | 0.305148 | 0.305148 | 0.305148 | 0.305148 | 0.0 | 0.205937 | 0.205937 | 0.205937 | 0.205937 | 0.0 | 0.074863 | 0.074863 | 0.074863 | 0.074863 | 0.0 | 0.071975 | 0.071975 | 0.071975 | 0.071975 | 0.0 | 0.115288 | 0.115288 | 0.115288 | 0.115288 | 0.0 | 0.150934 | 0.150934 | 0.150934 | 0.150934 | 0.0 | 0.123582 | 0.123582 | 0.123582 | 0.123582 | 0.0 | 0.252064 | 0.274102 | 0.246760 | 0.217113 | 0.242858 | 0.132635 | 0.257733 | 0.277952 | 0.252709 | 0.225554 | 0.249208 | 0.125994 | 0.281304 | 0.277802 | 0.272725 | 0.278239 | 0.216198 | 0.283453 | 0.271123 | 0.287580 | 0.296247 | 0.402675 | 0.276163 | 0.141316 | 0.364001 | 0.408677 | 0.366349 | 0.482097 | 0.319001 | 0.296147 | 0.324754 | 0.419103 | 0.270217 | 0.446600 | 0.317694 | 0.296772 | 0.442787 |
min | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 0.000000 |
25% | 96.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.966510 | -0.966510 | -0.966510 | -0.966510 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.306122 | 0.306122 | 0.306122 | 0.306122 | -1.0 | -0.930644 | -0.930644 | -0.930644 | -0.930644 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.291405 | -0.291405 | -0.291405 | -0.291405 | -1.0 | -0.341463 | -0.341463 | -0.341463 | -0.341463 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | -0.894695 | -0.894695 | -0.894695 | -0.894695 | -1.0 | -0.832368 | -0.832368 | -0.832368 | -0.832368 | -1.0 | -0.827801 | -0.827801 | -0.827801 | -0.827801 | -1.0 | -0.896759 | -0.896759 | -0.896759 | -0.896759 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.982231 | -0.982231 | -0.982231 | -0.982231 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.604806 | -0.604806 | -0.604806 | -0.604806 | -1.0 | -0.629630 | -0.629630 | -0.629630 | -0.629630 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.142857 | -0.142857 | -0.142857 | -0.142857 | -1.0 | -0.996827 | -0.996827 | -0.996827 | -0.996827 | -1.0 | -0.993521 | -0.993521 | -0.993521 | -0.993521 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.898795 | -0.898795 | -0.898795 | -0.898795 | -1.0 | -0.978877 | -0.978877 | -0.978877 | -0.978877 | -1.0 | -0.262708 | -0.523077 | -0.420791 | -0.552542 | -0.102991 | 0.684211 | -0.283951 | -0.538462 | -0.433962 | -0.517241 | -0.107143 | 0.684211 | -0.195876 | -0.375000 | -0.452991 | -0.642857 | 0.186813 | 0.818182 | -0.418803 | -0.578378 | -0.477612 | -0.575758 | -0.188406 | 0.736842 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 0.000000 |
50% | 192.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.909413 | -0.909413 | -0.909413 | -0.909413 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.132075 | -0.132075 | -0.132075 | -0.132075 | -1.0 | -0.182927 | -0.182927 | -0.182927 | -0.182927 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.773658 | -0.773658 | -0.773658 | -0.773658 | -1.0 | -0.736515 | -0.736515 | -0.736515 | -0.736515 | -1.0 | -0.847139 | -0.847139 | -0.847139 | -0.847139 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.942911 | -0.942911 | -0.942911 | -0.942911 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.463284 | -0.463284 | -0.463284 | -0.463284 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.995428 | -0.995428 | -0.995428 | -0.995428 | -1.0 | -0.986662 | -0.986662 | -0.986662 | -0.986662 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.874699 | -0.874699 | -0.874699 | -0.874699 | -1.0 | -0.978029 | -0.978029 | -0.978029 | -0.978029 | -1.0 | -0.100172 | -0.374405 | -0.283019 | -0.502825 | 0.035714 | 0.736842 | -0.135802 | -0.384615 | -0.283019 | -0.517241 | 0.035714 | 0.736842 | -0.030928 | -0.250000 | -0.282051 | -0.500000 | 0.318681 | 0.878788 | -0.247863 | -0.459459 | -0.328358 | -0.454545 | -0.014493 | 0.842105 | -1.000000 | -0.987730 | -0.984733 | -1.000000 | -0.976190 | -0.979798 | -1.000000 | -0.984944 | -0.989822 | -1.000000 | -0.975924 | -0.980333 | 0.000000 |
75% | 288.000000 | 1.000000 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.958115 | -0.958115 | -0.958115 | -0.958115 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.886766 | -0.886766 | -0.886766 | -0.886766 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.956776 | -0.956776 | -0.956776 | -0.956776 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.002096 | -0.002096 | -0.002096 | -0.002096 | -1.0 | -0.024390 | -0.024390 | -0.024390 | -0.024390 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.702588 | -0.702588 | -0.702588 | -0.702588 | -1.0 | -0.614108 | -0.614108 | -0.614108 | -0.614108 | -1.0 | -0.780312 | -0.780312 | -0.780312 | -0.780312 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.815123 | -0.815123 | -0.815123 | -0.815123 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.228304 | -0.228304 | -0.228304 | -0.228304 | -1.0 | -0.444444 | -0.444444 | -0.444444 | -0.444444 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.066667 | 0.066667 | 0.066667 | 0.066667 | -1.0 | -0.994961 | -0.994961 | -0.994961 | -0.994961 | -1.0 | -0.984756 | -0.984756 | -0.984756 | -0.984756 | -1.0 | -0.836512 | -0.836512 | -0.836512 | -0.836512 | -1.0 | -0.812048 | -0.812048 | -0.812048 | -0.812048 | -1.0 | -0.968315 | -0.968315 | -0.968315 | -0.968315 | -1.0 | 0.086420 | -0.184615 | -0.132075 | -0.383289 | 0.205890 | 0.823995 | 0.086420 | -0.200000 | -0.132075 | -0.379310 | 0.196429 | 0.842105 | 0.175258 | -0.050000 | -0.094017 | -0.357143 | 0.472527 | 0.919192 | -0.076923 | -0.243243 | -0.119403 | -0.212121 | 0.217391 | 0.894737 | -0.565217 | -0.558282 | -0.541985 | -0.647059 | -0.595238 | -0.878788 | -0.645482 | -0.522176 | -0.662529 | -0.634409 | -0.594677 | -0.880155 | 1.000000 |
max | 384.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 |
#Check class, dtype, number of columns and rows
data.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 1925 entries, 0 to 1924 Columns: 231 entries, PATIENT_VISIT_IDENTIFIER to ICU dtypes: float64(225), int64(4), object(2) memory usage: 3.4+ MB
# check what are the 2 categorical features
cat_cols = data.select_dtypes(include=['object']).columns
num_cols = data.select_dtypes(exclude=['object']).columns
cat_cols
Index(['AGE_PERCENTIL', 'WINDOW'], dtype='object')
# Check total number of patients in our data
sum_patients=data['PATIENT_VISIT_IDENTIFIER'].nunique()
print('There are {} patients in the dataset'.format(sum_patients))
There are 385 patients in the dataset
data['ICU'].value_counts()
0 1410 1 515 Name: ICU, dtype: int64
data.groupby('PATIENT_VISIT_IDENTIFIER').agg({'ICU': max}).value_counts()
ICU 1 195 0 190 dtype: int64
# Plot ICU cases
fig, ax = plt.subplots(figsize=(8,6))
sns.countplot(data = data.groupby('PATIENT_VISIT_IDENTIFIER').agg({'ICU': max}), x='ICU', ax=ax, palette='nipy_spectral')
<matplotlib.axes._subplots.AxesSubplot at 0x7fcadf92d910>
Between the 385 patients in our dataset, we can se that 195 patients were admitted to the ICU and 190 weren't. We can consider this distribution of data close enough and our target variable is well balanced.
ICU_table = data.pivot(index="PATIENT_VISIT_IDENTIFIER", columns="WINDOW", values="ICU")
ICU_table["Type"] = ICU_table.sum(axis=1)
dic = {5: "0-2", 4: "2-4", 3: "4-6", 2: "6-12", 1:"ABOVE_12", 0: "No ICU adm"}
ICU_table["WINDOW"] = ICU_table["Type"].replace(dic)
temp = ICU_table.groupby("WINDOW").count()
sns.barplot(data = temp.reset_index(), x = "WINDOW", y ="ABOVE_12", palette='nipy_spectral')
plt.title("Nº of people admited to ICU by window of time")
plt.ylabel('Nº of people admited to ICU')
plt.show()
Obs:
The graph above shows the number of admissions to the ICU by window of time.
From the people that are admited in the ICU, the highest percentage is after 12 hours of being admitted to the hospital.
mdata = []
for feature in data.columns:
# Defining the role
if feature == 'ICU':
role = 'target'
elif feature == 'PATIENT_VISIT_IDENTIFIER':
role = 'id'
else:
role = 'input'
# Defining the level
if feature == 'PATIENT_VISIT_IDENTIFIER' or data[feature].dtype == object:
level = 'nominal'
elif feature=='AGE_ABOVE65' or feature=='GENDER' or feature=='DISEASE GROUPING 1' or feature=='DISEASE GROUPING 2' or feature=='DISEASE GROUPING 3' or feature=='DISEASE GROUPING 4' or feature=='DISEASE GROUPING 5' or feature=='DISEASE GROUPING 6' or feature=='HTN' or feature=='IMMUNOCOMPROMISED' or feature=='OTHER' or feature=='ICU':
level = 'binary'
elif data[feature].dtype == float:
level = 'interval'
else:
level = 'ordinal'
# Initialize keep to True for all variables except for id
keep = True
if feature == 'Id':
keep = False
# Defining the data type
dtype = data[feature].dtype
# Creating a Dict that contains all the metadata for the variable
feature_dict = {
'varname': feature,
'role': role,
'level': level,
'keep': keep,
'dtype': dtype
}
mdata.append(feature_dict)
meta1 = pd.DataFrame(mdata, columns=['varname', 'role', 'level', 'keep', 'dtype'])
meta1.set_index('varname', inplace=True)
meta1
role | level | keep | dtype | |
---|---|---|---|---|
varname | ||||
PATIENT_VISIT_IDENTIFIER | id | nominal | True | int64 |
AGE_ABOVE65 | input | binary | True | int64 |
AGE_PERCENTIL | input | nominal | True | object |
GENDER | input | binary | True | int64 |
DISEASE GROUPING 1 | input | binary | True | float64 |
DISEASE GROUPING 2 | input | binary | True | float64 |
DISEASE GROUPING 3 | input | binary | True | float64 |
DISEASE GROUPING 4 | input | binary | True | float64 |
DISEASE GROUPING 5 | input | binary | True | float64 |
DISEASE GROUPING 6 | input | binary | True | float64 |
HTN | input | binary | True | float64 |
IMMUNOCOMPROMISED | input | binary | True | float64 |
OTHER | input | binary | True | float64 |
ALBUMIN_MEDIAN | input | interval | True | float64 |
ALBUMIN_MEAN | input | interval | True | float64 |
ALBUMIN_MIN | input | interval | True | float64 |
ALBUMIN_MAX | input | interval | True | float64 |
ALBUMIN_DIFF | input | interval | True | float64 |
BE_ARTERIAL_MEDIAN | input | interval | True | float64 |
BE_ARTERIAL_MEAN | input | interval | True | float64 |
BE_ARTERIAL_MIN | input | interval | True | float64 |
BE_ARTERIAL_MAX | input | interval | True | float64 |
BE_ARTERIAL_DIFF | input | interval | True | float64 |
BE_VENOUS_MEDIAN | input | interval | True | float64 |
BE_VENOUS_MEAN | input | interval | True | float64 |
BE_VENOUS_MIN | input | interval | True | float64 |
BE_VENOUS_MAX | input | interval | True | float64 |
BE_VENOUS_DIFF | input | interval | True | float64 |
BIC_ARTERIAL_MEDIAN | input | interval | True | float64 |
BIC_ARTERIAL_MEAN | input | interval | True | float64 |
BIC_ARTERIAL_MIN | input | interval | True | float64 |
BIC_ARTERIAL_MAX | input | interval | True | float64 |
BIC_ARTERIAL_DIFF | input | interval | True | float64 |
BIC_VENOUS_MEDIAN | input | interval | True | float64 |
BIC_VENOUS_MEAN | input | interval | True | float64 |
BIC_VENOUS_MIN | input | interval | True | float64 |
BIC_VENOUS_MAX | input | interval | True | float64 |
BIC_VENOUS_DIFF | input | interval | True | float64 |
BILLIRUBIN_MEDIAN | input | interval | True | float64 |
BILLIRUBIN_MEAN | input | interval | True | float64 |
BILLIRUBIN_MIN | input | interval | True | float64 |
BILLIRUBIN_MAX | input | interval | True | float64 |
BILLIRUBIN_DIFF | input | interval | True | float64 |
BLAST_MEDIAN | input | interval | True | float64 |
BLAST_MEAN | input | interval | True | float64 |
BLAST_MIN | input | interval | True | float64 |
BLAST_MAX | input | interval | True | float64 |
BLAST_DIFF | input | interval | True | float64 |
CALCIUM_MEDIAN | input | interval | True | float64 |
CALCIUM_MEAN | input | interval | True | float64 |
CALCIUM_MIN | input | interval | True | float64 |
CALCIUM_MAX | input | interval | True | float64 |
CALCIUM_DIFF | input | interval | True | float64 |
CREATININ_MEDIAN | input | interval | True | float64 |
CREATININ_MEAN | input | interval | True | float64 |
CREATININ_MIN | input | interval | True | float64 |
CREATININ_MAX | input | interval | True | float64 |
CREATININ_DIFF | input | interval | True | float64 |
FFA_MEDIAN | input | interval | True | float64 |
FFA_MEAN | input | interval | True | float64 |
FFA_MIN | input | interval | True | float64 |
FFA_MAX | input | interval | True | float64 |
FFA_DIFF | input | interval | True | float64 |
GGT_MEDIAN | input | interval | True | float64 |
GGT_MEAN | input | interval | True | float64 |
GGT_MIN | input | interval | True | float64 |
GGT_MAX | input | interval | True | float64 |
GGT_DIFF | input | interval | True | float64 |
GLUCOSE_MEDIAN | input | interval | True | float64 |
GLUCOSE_MEAN | input | interval | True | float64 |
GLUCOSE_MIN | input | interval | True | float64 |
GLUCOSE_MAX | input | interval | True | float64 |
GLUCOSE_DIFF | input | interval | True | float64 |
HEMATOCRITE_MEDIAN | input | interval | True | float64 |
HEMATOCRITE_MEAN | input | interval | True | float64 |
HEMATOCRITE_MIN | input | interval | True | float64 |
HEMATOCRITE_MAX | input | interval | True | float64 |
HEMATOCRITE_DIFF | input | interval | True | float64 |
HEMOGLOBIN_MEDIAN | input | interval | True | float64 |
HEMOGLOBIN_MEAN | input | interval | True | float64 |
HEMOGLOBIN_MIN | input | interval | True | float64 |
HEMOGLOBIN_MAX | input | interval | True | float64 |
HEMOGLOBIN_DIFF | input | interval | True | float64 |
INR_MEDIAN | input | interval | True | float64 |
INR_MEAN | input | interval | True | float64 |
INR_MIN | input | interval | True | float64 |
INR_MAX | input | interval | True | float64 |
INR_DIFF | input | interval | True | float64 |
LACTATE_MEDIAN | input | interval | True | float64 |
LACTATE_MEAN | input | interval | True | float64 |
LACTATE_MIN | input | interval | True | float64 |
LACTATE_MAX | input | interval | True | float64 |
LACTATE_DIFF | input | interval | True | float64 |
LEUKOCYTES_MEDIAN | input | interval | True | float64 |
LEUKOCYTES_MEAN | input | interval | True | float64 |
LEUKOCYTES_MIN | input | interval | True | float64 |
LEUKOCYTES_MAX | input | interval | True | float64 |
LEUKOCYTES_DIFF | input | interval | True | float64 |
LINFOCITOS_MEDIAN | input | interval | True | float64 |
LINFOCITOS_MEAN | input | interval | True | float64 |
LINFOCITOS_MIN | input | interval | True | float64 |
LINFOCITOS_MAX | input | interval | True | float64 |
LINFOCITOS_DIFF | input | interval | True | float64 |
NEUTROPHILES_MEDIAN | input | interval | True | float64 |
NEUTROPHILES_MEAN | input | interval | True | float64 |
NEUTROPHILES_MIN | input | interval | True | float64 |
NEUTROPHILES_MAX | input | interval | True | float64 |
NEUTROPHILES_DIFF | input | interval | True | float64 |
P02_ARTERIAL_MEDIAN | input | interval | True | float64 |
P02_ARTERIAL_MEAN | input | interval | True | float64 |
P02_ARTERIAL_MIN | input | interval | True | float64 |
P02_ARTERIAL_MAX | input | interval | True | float64 |
P02_ARTERIAL_DIFF | input | interval | True | float64 |
P02_VENOUS_MEDIAN | input | interval | True | float64 |
P02_VENOUS_MEAN | input | interval | True | float64 |
P02_VENOUS_MIN | input | interval | True | float64 |
P02_VENOUS_MAX | input | interval | True | float64 |
P02_VENOUS_DIFF | input | interval | True | float64 |
PC02_ARTERIAL_MEDIAN | input | interval | True | float64 |
PC02_ARTERIAL_MEAN | input | interval | True | float64 |
PC02_ARTERIAL_MIN | input | interval | True | float64 |
PC02_ARTERIAL_MAX | input | interval | True | float64 |
PC02_ARTERIAL_DIFF | input | interval | True | float64 |
PC02_VENOUS_MEDIAN | input | interval | True | float64 |
PC02_VENOUS_MEAN | input | interval | True | float64 |
PC02_VENOUS_MIN | input | interval | True | float64 |
PC02_VENOUS_MAX | input | interval | True | float64 |
PC02_VENOUS_DIFF | input | interval | True | float64 |
PCR_MEDIAN | input | interval | True | float64 |
PCR_MEAN | input | interval | True | float64 |
PCR_MIN | input | interval | True | float64 |
PCR_MAX | input | interval | True | float64 |
PCR_DIFF | input | interval | True | float64 |
PH_ARTERIAL_MEDIAN | input | interval | True | float64 |
PH_ARTERIAL_MEAN | input | interval | True | float64 |
PH_ARTERIAL_MIN | input | interval | True | float64 |
PH_ARTERIAL_MAX | input | interval | True | float64 |
PH_ARTERIAL_DIFF | input | interval | True | float64 |
PH_VENOUS_MEDIAN | input | interval | True | float64 |
PH_VENOUS_MEAN | input | interval | True | float64 |
PH_VENOUS_MIN | input | interval | True | float64 |
PH_VENOUS_MAX | input | interval | True | float64 |
PH_VENOUS_DIFF | input | interval | True | float64 |
PLATELETS_MEDIAN | input | interval | True | float64 |
PLATELETS_MEAN | input | interval | True | float64 |
PLATELETS_MIN | input | interval | True | float64 |
PLATELETS_MAX | input | interval | True | float64 |
PLATELETS_DIFF | input | interval | True | float64 |
POTASSIUM_MEDIAN | input | interval | True | float64 |
POTASSIUM_MEAN | input | interval | True | float64 |
POTASSIUM_MIN | input | interval | True | float64 |
POTASSIUM_MAX | input | interval | True | float64 |
POTASSIUM_DIFF | input | interval | True | float64 |
SAT02_ARTERIAL_MEDIAN | input | interval | True | float64 |
SAT02_ARTERIAL_MEAN | input | interval | True | float64 |
SAT02_ARTERIAL_MIN | input | interval | True | float64 |
SAT02_ARTERIAL_MAX | input | interval | True | float64 |
SAT02_ARTERIAL_DIFF | input | interval | True | float64 |
SAT02_VENOUS_MEDIAN | input | interval | True | float64 |
SAT02_VENOUS_MEAN | input | interval | True | float64 |
SAT02_VENOUS_MIN | input | interval | True | float64 |
SAT02_VENOUS_MAX | input | interval | True | float64 |
SAT02_VENOUS_DIFF | input | interval | True | float64 |
SODIUM_MEDIAN | input | interval | True | float64 |
SODIUM_MEAN | input | interval | True | float64 |
SODIUM_MIN | input | interval | True | float64 |
SODIUM_MAX | input | interval | True | float64 |
SODIUM_DIFF | input | interval | True | float64 |
TGO_MEDIAN | input | interval | True | float64 |
TGO_MEAN | input | interval | True | float64 |
TGO_MIN | input | interval | True | float64 |
TGO_MAX | input | interval | True | float64 |
TGO_DIFF | input | interval | True | float64 |
TGP_MEDIAN | input | interval | True | float64 |
TGP_MEAN | input | interval | True | float64 |
TGP_MIN | input | interval | True | float64 |
TGP_MAX | input | interval | True | float64 |
TGP_DIFF | input | interval | True | float64 |
TTPA_MEDIAN | input | interval | True | float64 |
TTPA_MEAN | input | interval | True | float64 |
TTPA_MIN | input | interval | True | float64 |
TTPA_MAX | input | interval | True | float64 |
TTPA_DIFF | input | interval | True | float64 |
UREA_MEDIAN | input | interval | True | float64 |
UREA_MEAN | input | interval | True | float64 |
UREA_MIN | input | interval | True | float64 |
UREA_MAX | input | interval | True | float64 |
UREA_DIFF | input | interval | True | float64 |
DIMER_MEDIAN | input | interval | True | float64 |
DIMER_MEAN | input | interval | True | float64 |
DIMER_MIN | input | interval | True | float64 |
DIMER_MAX | input | interval | True | float64 |
DIMER_DIFF | input | interval | True | float64 |
BLOODPRESSURE_DIASTOLIC_MEAN | input | interval | True | float64 |
BLOODPRESSURE_SISTOLIC_MEAN | input | interval | True | float64 |
HEART_RATE_MEAN | input | interval | True | float64 |
RESPIRATORY_RATE_MEAN | input | interval | True | float64 |
TEMPERATURE_MEAN | input | interval | True | float64 |
OXYGEN_SATURATION_MEAN | input | interval | True | float64 |
BLOODPRESSURE_DIASTOLIC_MEDIAN | input | interval | True | float64 |
BLOODPRESSURE_SISTOLIC_MEDIAN | input | interval | True | float64 |
HEART_RATE_MEDIAN | input | interval | True | float64 |
RESPIRATORY_RATE_MEDIAN | input | interval | True | float64 |
TEMPERATURE_MEDIAN | input | interval | True | float64 |
OXYGEN_SATURATION_MEDIAN | input | interval | True | float64 |
BLOODPRESSURE_DIASTOLIC_MIN | input | interval | True | float64 |
BLOODPRESSURE_SISTOLIC_MIN | input | interval | True | float64 |
HEART_RATE_MIN | input | interval | True | float64 |
RESPIRATORY_RATE_MIN | input | interval | True | float64 |
TEMPERATURE_MIN | input | interval | True | float64 |
OXYGEN_SATURATION_MIN | input | interval | True | float64 |
BLOODPRESSURE_DIASTOLIC_MAX | input | interval | True | float64 |
BLOODPRESSURE_SISTOLIC_MAX | input | interval | True | float64 |
HEART_RATE_MAX | input | interval | True | float64 |
RESPIRATORY_RATE_MAX | input | interval | True | float64 |
TEMPERATURE_MAX | input | interval | True | float64 |
OXYGEN_SATURATION_MAX | input | interval | True | float64 |
BLOODPRESSURE_DIASTOLIC_DIFF | input | interval | True | float64 |
BLOODPRESSURE_SISTOLIC_DIFF | input | interval | True | float64 |
HEART_RATE_DIFF | input | interval | True | float64 |
RESPIRATORY_RATE_DIFF | input | interval | True | float64 |
TEMPERATURE_DIFF | input | interval | True | float64 |
OXYGEN_SATURATION_DIFF | input | interval | True | float64 |
BLOODPRESSURE_DIASTOLIC_DIFF_REL | input | interval | True | float64 |
BLOODPRESSURE_SISTOLIC_DIFF_REL | input | interval | True | float64 |
HEART_RATE_DIFF_REL | input | interval | True | float64 |
RESPIRATORY_RATE_DIFF_REL | input | interval | True | float64 |
TEMPERATURE_DIFF_REL | input | interval | True | float64 |
OXYGEN_SATURATION_DIFF_REL | input | interval | True | float64 |
WINDOW | input | nominal | True | object |
ICU | target | binary | True | int64 |
mdata = []
for feature in data.columns:
# Defining the role
if feature == 'ICU':
use = 'target'
elif feature == 'PATIENT_VISIT_IDENTIFIER':
use = 'id'
else:
use = 'input'
# Defining the type
if feature=='AGE_ABOVE65' or feature=='GENDER' or feature=='DISEASE GROUPING 1' or feature=='DISEASE GROUPING 2' or feature=='DISEASE GROUPING 3' or feature=='DISEASE GROUPING 4' or feature=='DISEASE GROUPING 5' or feature=='DISEASE GROUPING 6' or feature=='HTN' or feature=='IMMUNOCOMPROMISED' or feature=='OTHER' or feature=='ICU':
type = 'binary'
elif feature == 'id' or data[feature].dtype == object:
type = 'categorical'
elif data[feature].dtype == float or isinstance(data[feature].dtype, float):
type = 'real'
else:
type = 'integer'
# Initialize preserve to True for all variables except for id
preserve = True
if feature == 'PATIENT_VISIT_IDENTIFIER':
preserve = False
# Defining the data type
dtype = data[feature].dtype
category = 'none'
# Defining the category
if feature == 'PATIENT_VISIT_IDENTIFIER':
category = 'id'
elif feature == 'AGE_ABOVE65' or feature == 'AGE_PERCENTIL':
category = 'age'
elif feature == 'ICU':
category = 'target'
elif 'DISEASE' in feature or feature=='HTN' or feature=='OTHER' or feature =='IMMUNOCOMPROMISED':
category = 'disease'
elif feature=='GENDER':
category = 'gender'
else :
category = 'vital signs and blood results'
# Creating a Dict that contains all the metadata for the variable
feature_dictionary = {
'varname': feature,
'use': use,
'type': type,
'preserve': preserve,
'dtype': dtype,
'category' : category
}
mdata.append(feature_dictionary)
meta2 = pd.DataFrame(mdata, columns=['varname', 'use', 'type', 'preserve', 'dtype', 'category'])
meta2.set_index('varname', inplace=True)
meta2
use | type | preserve | dtype | category | |
---|---|---|---|---|---|
varname | |||||
PATIENT_VISIT_IDENTIFIER | id | integer | False | int64 | id |
AGE_ABOVE65 | input | binary | True | int64 | age |
AGE_PERCENTIL | input | categorical | True | object | age |
GENDER | input | binary | True | int64 | gender |
DISEASE GROUPING 1 | input | binary | True | float64 | disease |
DISEASE GROUPING 2 | input | binary | True | float64 | disease |
DISEASE GROUPING 3 | input | binary | True | float64 | disease |
DISEASE GROUPING 4 | input | binary | True | float64 | disease |
DISEASE GROUPING 5 | input | binary | True | float64 | disease |
DISEASE GROUPING 6 | input | binary | True | float64 | disease |
HTN | input | binary | True | float64 | disease |
IMMUNOCOMPROMISED | input | binary | True | float64 | disease |
OTHER | input | binary | True | float64 | disease |
ALBUMIN_MEDIAN | input | real | True | float64 | vital signs and blood results |
ALBUMIN_MEAN | input | real | True | float64 | vital signs and blood results |
ALBUMIN_MIN | input | real | True | float64 | vital signs and blood results |
ALBUMIN_MAX | input | real | True | float64 | vital signs and blood results |
ALBUMIN_DIFF | input | real | True | float64 | vital signs and blood results |
BE_ARTERIAL_MEDIAN | input | real | True | float64 | vital signs and blood results |
BE_ARTERIAL_MEAN | input | real | True | float64 | vital signs and blood results |
BE_ARTERIAL_MIN | input | real | True | float64 | vital signs and blood results |
BE_ARTERIAL_MAX | input | real | True | float64 | vital signs and blood results |
BE_ARTERIAL_DIFF | input | real | True | float64 | vital signs and blood results |
BE_VENOUS_MEDIAN | input | real | True | float64 | vital signs and blood results |
BE_VENOUS_MEAN | input | real | True | float64 | vital signs and blood results |
BE_VENOUS_MIN | input | real | True | float64 | vital signs and blood results |
BE_VENOUS_MAX | input | real | True | float64 | vital signs and blood results |
BE_VENOUS_DIFF | input | real | True | float64 | vital signs and blood results |
BIC_ARTERIAL_MEDIAN | input | real | True | float64 | vital signs and blood results |
BIC_ARTERIAL_MEAN | input | real | True | float64 | vital signs and blood results |
BIC_ARTERIAL_MIN | input | real | True | float64 | vital signs and blood results |
BIC_ARTERIAL_MAX | input | real | True | float64 | vital signs and blood results |
BIC_ARTERIAL_DIFF | input | real | True | float64 | vital signs and blood results |
BIC_VENOUS_MEDIAN | input | real | True | float64 | vital signs and blood results |
BIC_VENOUS_MEAN | input | real | True | float64 | vital signs and blood results |
BIC_VENOUS_MIN | input | real | True | float64 | vital signs and blood results |
BIC_VENOUS_MAX | input | real | True | float64 | vital signs and blood results |
BIC_VENOUS_DIFF | input | real | True | float64 | vital signs and blood results |
BILLIRUBIN_MEDIAN | input | real | True | float64 | vital signs and blood results |
BILLIRUBIN_MEAN | input | real | True | float64 | vital signs and blood results |
BILLIRUBIN_MIN | input | real | True | float64 | vital signs and blood results |
BILLIRUBIN_MAX | input | real | True | float64 | vital signs and blood results |
BILLIRUBIN_DIFF | input | real | True | float64 | vital signs and blood results |
BLAST_MEDIAN | input | real | True | float64 | vital signs and blood results |
BLAST_MEAN | input | real | True | float64 | vital signs and blood results |
BLAST_MIN | input | real | True | float64 | vital signs and blood results |
BLAST_MAX | input | real | True | float64 | vital signs and blood results |
BLAST_DIFF | input | real | True | float64 | vital signs and blood results |
CALCIUM_MEDIAN | input | real | True | float64 | vital signs and blood results |
CALCIUM_MEAN | input | real | True | float64 | vital signs and blood results |
CALCIUM_MIN | input | real | True | float64 | vital signs and blood results |
CALCIUM_MAX | input | real | True | float64 | vital signs and blood results |
CALCIUM_DIFF | input | real | True | float64 | vital signs and blood results |
CREATININ_MEDIAN | input | real | True | float64 | vital signs and blood results |
CREATININ_MEAN | input | real | True | float64 | vital signs and blood results |
CREATININ_MIN | input | real | True | float64 | vital signs and blood results |
CREATININ_MAX | input | real | True | float64 | vital signs and blood results |
CREATININ_DIFF | input | real | True | float64 | vital signs and blood results |
FFA_MEDIAN | input | real | True | float64 | vital signs and blood results |
FFA_MEAN | input | real | True | float64 | vital signs and blood results |
FFA_MIN | input | real | True | float64 | vital signs and blood results |
FFA_MAX | input | real | True | float64 | vital signs and blood results |
FFA_DIFF | input | real | True | float64 | vital signs and blood results |
GGT_MEDIAN | input | real | True | float64 | vital signs and blood results |
GGT_MEAN | input | real | True | float64 | vital signs and blood results |
GGT_MIN | input | real | True | float64 | vital signs and blood results |
GGT_MAX | input | real | True | float64 | vital signs and blood results |
GGT_DIFF | input | real | True | float64 | vital signs and blood results |
GLUCOSE_MEDIAN | input | real | True | float64 | vital signs and blood results |
GLUCOSE_MEAN | input | real | True | float64 | vital signs and blood results |
GLUCOSE_MIN | input | real | True | float64 | vital signs and blood results |
GLUCOSE_MAX | input | real | True | float64 | vital signs and blood results |
GLUCOSE_DIFF | input | real | True | float64 | vital signs and blood results |
HEMATOCRITE_MEDIAN | input | real | True | float64 | vital signs and blood results |
HEMATOCRITE_MEAN | input | real | True | float64 | vital signs and blood results |
HEMATOCRITE_MIN | input | real | True | float64 | vital signs and blood results |
HEMATOCRITE_MAX | input | real | True | float64 | vital signs and blood results |
HEMATOCRITE_DIFF | input | real | True | float64 | vital signs and blood results |
HEMOGLOBIN_MEDIAN | input | real | True | float64 | vital signs and blood results |
HEMOGLOBIN_MEAN | input | real | True | float64 | vital signs and blood results |
HEMOGLOBIN_MIN | input | real | True | float64 | vital signs and blood results |
HEMOGLOBIN_MAX | input | real | True | float64 | vital signs and blood results |
HEMOGLOBIN_DIFF | input | real | True | float64 | vital signs and blood results |
INR_MEDIAN | input | real | True | float64 | vital signs and blood results |
INR_MEAN | input | real | True | float64 | vital signs and blood results |
INR_MIN | input | real | True | float64 | vital signs and blood results |
INR_MAX | input | real | True | float64 | vital signs and blood results |
INR_DIFF | input | real | True | float64 | vital signs and blood results |
LACTATE_MEDIAN | input | real | True | float64 | vital signs and blood results |
LACTATE_MEAN | input | real | True | float64 | vital signs and blood results |
LACTATE_MIN | input | real | True | float64 | vital signs and blood results |
LACTATE_MAX | input | real | True | float64 | vital signs and blood results |
LACTATE_DIFF | input | real | True | float64 | vital signs and blood results |
LEUKOCYTES_MEDIAN | input | real | True | float64 | vital signs and blood results |
LEUKOCYTES_MEAN | input | real | True | float64 | vital signs and blood results |
LEUKOCYTES_MIN | input | real | True | float64 | vital signs and blood results |
LEUKOCYTES_MAX | input | real | True | float64 | vital signs and blood results |
LEUKOCYTES_DIFF | input | real | True | float64 | vital signs and blood results |
LINFOCITOS_MEDIAN | input | real | True | float64 | vital signs and blood results |
LINFOCITOS_MEAN | input | real | True | float64 | vital signs and blood results |
LINFOCITOS_MIN | input | real | True | float64 | vital signs and blood results |
LINFOCITOS_MAX | input | real | True | float64 | vital signs and blood results |
LINFOCITOS_DIFF | input | real | True | float64 | vital signs and blood results |
NEUTROPHILES_MEDIAN | input | real | True | float64 | vital signs and blood results |
NEUTROPHILES_MEAN | input | real | True | float64 | vital signs and blood results |
NEUTROPHILES_MIN | input | real | True | float64 | vital signs and blood results |
NEUTROPHILES_MAX | input | real | True | float64 | vital signs and blood results |
NEUTROPHILES_DIFF | input | real | True | float64 | vital signs and blood results |
P02_ARTERIAL_MEDIAN | input | real | True | float64 | vital signs and blood results |
P02_ARTERIAL_MEAN | input | real | True | float64 | vital signs and blood results |
P02_ARTERIAL_MIN | input | real | True | float64 | vital signs and blood results |
P02_ARTERIAL_MAX | input | real | True | float64 | vital signs and blood results |
P02_ARTERIAL_DIFF | input | real | True | float64 | vital signs and blood results |
P02_VENOUS_MEDIAN | input | real | True | float64 | vital signs and blood results |
P02_VENOUS_MEAN | input | real | True | float64 | vital signs and blood results |
P02_VENOUS_MIN | input | real | True | float64 | vital signs and blood results |
P02_VENOUS_MAX | input | real | True | float64 | vital signs and blood results |
P02_VENOUS_DIFF | input | real | True | float64 | vital signs and blood results |
PC02_ARTERIAL_MEDIAN | input | real | True | float64 | vital signs and blood results |
PC02_ARTERIAL_MEAN | input | real | True | float64 | vital signs and blood results |
PC02_ARTERIAL_MIN | input | real | True | float64 | vital signs and blood results |
PC02_ARTERIAL_MAX | input | real | True | float64 | vital signs and blood results |
PC02_ARTERIAL_DIFF | input | real | True | float64 | vital signs and blood results |
PC02_VENOUS_MEDIAN | input | real | True | float64 | vital signs and blood results |
PC02_VENOUS_MEAN | input | real | True | float64 | vital signs and blood results |
PC02_VENOUS_MIN | input | real | True | float64 | vital signs and blood results |
PC02_VENOUS_MAX | input | real | True | float64 | vital signs and blood results |
PC02_VENOUS_DIFF | input | real | True | float64 | vital signs and blood results |
PCR_MEDIAN | input | real | True | float64 | vital signs and blood results |
PCR_MEAN | input | real | True | float64 | vital signs and blood results |
PCR_MIN | input | real | True | float64 | vital signs and blood results |
PCR_MAX | input | real | True | float64 | vital signs and blood results |
PCR_DIFF | input | real | True | float64 | vital signs and blood results |
PH_ARTERIAL_MEDIAN | input | real | True | float64 | vital signs and blood results |
PH_ARTERIAL_MEAN | input | real | True | float64 | vital signs and blood results |
PH_ARTERIAL_MIN | input | real | True | float64 | vital signs and blood results |
PH_ARTERIAL_MAX | input | real | True | float64 | vital signs and blood results |
PH_ARTERIAL_DIFF | input | real | True | float64 | vital signs and blood results |
PH_VENOUS_MEDIAN | input | real | True | float64 | vital signs and blood results |
PH_VENOUS_MEAN | input | real | True | float64 | vital signs and blood results |
PH_VENOUS_MIN | input | real | True | float64 | vital signs and blood results |
PH_VENOUS_MAX | input | real | True | float64 | vital signs and blood results |
PH_VENOUS_DIFF | input | real | True | float64 | vital signs and blood results |
PLATELETS_MEDIAN | input | real | True | float64 | vital signs and blood results |
PLATELETS_MEAN | input | real | True | float64 | vital signs and blood results |
PLATELETS_MIN | input | real | True | float64 | vital signs and blood results |
PLATELETS_MAX | input | real | True | float64 | vital signs and blood results |
PLATELETS_DIFF | input | real | True | float64 | vital signs and blood results |
POTASSIUM_MEDIAN | input | real | True | float64 | vital signs and blood results |
POTASSIUM_MEAN | input | real | True | float64 | vital signs and blood results |
POTASSIUM_MIN | input | real | True | float64 | vital signs and blood results |
POTASSIUM_MAX | input | real | True | float64 | vital signs and blood results |
POTASSIUM_DIFF | input | real | True | float64 | vital signs and blood results |
SAT02_ARTERIAL_MEDIAN | input | real | True | float64 | vital signs and blood results |
SAT02_ARTERIAL_MEAN | input | real | True | float64 | vital signs and blood results |
SAT02_ARTERIAL_MIN | input | real | True | float64 | vital signs and blood results |
SAT02_ARTERIAL_MAX | input | real | True | float64 | vital signs and blood results |
SAT02_ARTERIAL_DIFF | input | real | True | float64 | vital signs and blood results |
SAT02_VENOUS_MEDIAN | input | real | True | float64 | vital signs and blood results |
SAT02_VENOUS_MEAN | input | real | True | float64 | vital signs and blood results |
SAT02_VENOUS_MIN | input | real | True | float64 | vital signs and blood results |
SAT02_VENOUS_MAX | input | real | True | float64 | vital signs and blood results |
SAT02_VENOUS_DIFF | input | real | True | float64 | vital signs and blood results |
SODIUM_MEDIAN | input | real | True | float64 | vital signs and blood results |
SODIUM_MEAN | input | real | True | float64 | vital signs and blood results |
SODIUM_MIN | input | real | True | float64 | vital signs and blood results |
SODIUM_MAX | input | real | True | float64 | vital signs and blood results |
SODIUM_DIFF | input | real | True | float64 | vital signs and blood results |
TGO_MEDIAN | input | real | True | float64 | vital signs and blood results |
TGO_MEAN | input | real | True | float64 | vital signs and blood results |
TGO_MIN | input | real | True | float64 | vital signs and blood results |
TGO_MAX | input | real | True | float64 | vital signs and blood results |
TGO_DIFF | input | real | True | float64 | vital signs and blood results |
TGP_MEDIAN | input | real | True | float64 | vital signs and blood results |
TGP_MEAN | input | real | True | float64 | vital signs and blood results |
TGP_MIN | input | real | True | float64 | vital signs and blood results |
TGP_MAX | input | real | True | float64 | vital signs and blood results |
TGP_DIFF | input | real | True | float64 | vital signs and blood results |
TTPA_MEDIAN | input | real | True | float64 | vital signs and blood results |
TTPA_MEAN | input | real | True | float64 | vital signs and blood results |
TTPA_MIN | input | real | True | float64 | vital signs and blood results |
TTPA_MAX | input | real | True | float64 | vital signs and blood results |
TTPA_DIFF | input | real | True | float64 | vital signs and blood results |
UREA_MEDIAN | input | real | True | float64 | vital signs and blood results |
UREA_MEAN | input | real | True | float64 | vital signs and blood results |
UREA_MIN | input | real | True | float64 | vital signs and blood results |
UREA_MAX | input | real | True | float64 | vital signs and blood results |
UREA_DIFF | input | real | True | float64 | vital signs and blood results |
DIMER_MEDIAN | input | real | True | float64 | vital signs and blood results |
DIMER_MEAN | input | real | True | float64 | vital signs and blood results |
DIMER_MIN | input | real | True | float64 | vital signs and blood results |
DIMER_MAX | input | real | True | float64 | vital signs and blood results |
DIMER_DIFF | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_DIASTOLIC_MEAN | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_SISTOLIC_MEAN | input | real | True | float64 | vital signs and blood results |
HEART_RATE_MEAN | input | real | True | float64 | vital signs and blood results |
RESPIRATORY_RATE_MEAN | input | real | True | float64 | vital signs and blood results |
TEMPERATURE_MEAN | input | real | True | float64 | vital signs and blood results |
OXYGEN_SATURATION_MEAN | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_DIASTOLIC_MEDIAN | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_SISTOLIC_MEDIAN | input | real | True | float64 | vital signs and blood results |
HEART_RATE_MEDIAN | input | real | True | float64 | vital signs and blood results |
RESPIRATORY_RATE_MEDIAN | input | real | True | float64 | vital signs and blood results |
TEMPERATURE_MEDIAN | input | real | True | float64 | vital signs and blood results |
OXYGEN_SATURATION_MEDIAN | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_DIASTOLIC_MIN | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_SISTOLIC_MIN | input | real | True | float64 | vital signs and blood results |
HEART_RATE_MIN | input | real | True | float64 | vital signs and blood results |
RESPIRATORY_RATE_MIN | input | real | True | float64 | vital signs and blood results |
TEMPERATURE_MIN | input | real | True | float64 | vital signs and blood results |
OXYGEN_SATURATION_MIN | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_DIASTOLIC_MAX | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_SISTOLIC_MAX | input | real | True | float64 | vital signs and blood results |
HEART_RATE_MAX | input | real | True | float64 | vital signs and blood results |
RESPIRATORY_RATE_MAX | input | real | True | float64 | vital signs and blood results |
TEMPERATURE_MAX | input | real | True | float64 | vital signs and blood results |
OXYGEN_SATURATION_MAX | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_DIASTOLIC_DIFF | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_SISTOLIC_DIFF | input | real | True | float64 | vital signs and blood results |
HEART_RATE_DIFF | input | real | True | float64 | vital signs and blood results |
RESPIRATORY_RATE_DIFF | input | real | True | float64 | vital signs and blood results |
TEMPERATURE_DIFF | input | real | True | float64 | vital signs and blood results |
OXYGEN_SATURATION_DIFF | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_DIASTOLIC_DIFF_REL | input | real | True | float64 | vital signs and blood results |
BLOODPRESSURE_SISTOLIC_DIFF_REL | input | real | True | float64 | vital signs and blood results |
HEART_RATE_DIFF_REL | input | real | True | float64 | vital signs and blood results |
RESPIRATORY_RATE_DIFF_REL | input | real | True | float64 | vital signs and blood results |
TEMPERATURE_DIFF_REL | input | real | True | float64 | vital signs and blood results |
OXYGEN_SATURATION_DIFF_REL | input | real | True | float64 | vital signs and blood results |
WINDOW | input | categorical | True | object | vital signs and blood results |
ICU | target | binary | True | int64 | target |
meta2[(meta2.type == 'binary') & (meta2.preserve)].index
Index(['AGE_ABOVE65', 'GENDER', 'DISEASE GROUPING 1', 'DISEASE GROUPING 2', 'DISEASE GROUPING 3', 'DISEASE GROUPING 4', 'DISEASE GROUPING 5', 'DISEASE GROUPING 6', 'HTN', 'IMMUNOCOMPROMISED', 'OTHER', 'ICU'], dtype='object', name='varname')
pd.DataFrame({'count' : meta2.groupby(['category'])['category'].size()}).reset_index()
category | count | |
---|---|---|
0 | age | 2 |
1 | disease | 9 |
2 | gender | 1 |
3 | id | 1 |
4 | target | 1 |
5 | vital signs and blood results | 217 |
duplicates=data.drop_duplicates()
duplicates.shape
(1925, 231)
Obs: There are no duplicates in our data.
def _impute_missing_data(data):
return data.replace(-1, np.nan)
data_miss = _impute_missing_data(data)
print('NaN values =', data.isnull().sum().sum())
print("""""")
vars_with_missing = []
for feature in data.columns:
missings = data[feature].isna().sum()
if missings > 0 :
vars_with_missing.append(feature)
missings_perc = missings / data.shape[0]
print('Variable {} has {} records ({:.2%}) with missing values.'.format(feature, missings, missings_perc))
print('In total, there are {} variables with missing values'.format(len(vars_with_missing)))
NaN values = 223863 Variable DISEASE GROUPING 1 has 5 records (0.26%) with missing values. Variable DISEASE GROUPING 2 has 5 records (0.26%) with missing values. Variable DISEASE GROUPING 3 has 5 records (0.26%) with missing values. Variable DISEASE GROUPING 4 has 5 records (0.26%) with missing values. Variable DISEASE GROUPING 5 has 5 records (0.26%) with missing values. Variable DISEASE GROUPING 6 has 5 records (0.26%) with missing values. Variable HTN has 5 records (0.26%) with missing values. Variable IMMUNOCOMPROMISED has 5 records (0.26%) with missing values. Variable OTHER has 5 records (0.26%) with missing values. Variable ALBUMIN_MEDIAN has 1104 records (57.35%) with missing values. Variable ALBUMIN_MEAN has 1104 records (57.35%) with missing values. Variable ALBUMIN_MIN has 1104 records (57.35%) with missing values. Variable ALBUMIN_MAX has 1104 records (57.35%) with missing values. Variable ALBUMIN_DIFF has 1104 records (57.35%) with missing values. Variable BE_ARTERIAL_MEDIAN has 1104 records (57.35%) with missing values. Variable BE_ARTERIAL_MEAN has 1104 records (57.35%) with missing values. Variable BE_ARTERIAL_MIN has 1104 records (57.35%) with missing values. Variable BE_ARTERIAL_MAX has 1104 records (57.35%) with missing values. Variable BE_ARTERIAL_DIFF has 1104 records (57.35%) with missing values. Variable BE_VENOUS_MEDIAN has 1104 records (57.35%) with missing values. Variable BE_VENOUS_MEAN has 1104 records (57.35%) with missing values. Variable BE_VENOUS_MIN has 1104 records (57.35%) with missing values. Variable BE_VENOUS_MAX has 1104 records (57.35%) with missing values. Variable BE_VENOUS_DIFF has 1104 records (57.35%) with missing values. Variable BIC_ARTERIAL_MEDIAN has 1104 records (57.35%) with missing values. Variable BIC_ARTERIAL_MEAN has 1104 records (57.35%) with missing values. Variable BIC_ARTERIAL_MIN has 1104 records (57.35%) with missing values. Variable BIC_ARTERIAL_MAX has 1104 records (57.35%) with missing values. Variable BIC_ARTERIAL_DIFF has 1104 records (57.35%) with missing values. Variable BIC_VENOUS_MEDIAN has 1104 records (57.35%) with missing values. Variable BIC_VENOUS_MEAN has 1104 records (57.35%) with missing values. Variable BIC_VENOUS_MIN has 1104 records (57.35%) with missing values. Variable BIC_VENOUS_MAX has 1104 records (57.35%) with missing values. Variable BIC_VENOUS_DIFF has 1104 records (57.35%) with missing values. Variable BILLIRUBIN_MEDIAN has 1104 records (57.35%) with missing values. Variable BILLIRUBIN_MEAN has 1104 records (57.35%) with missing values. Variable BILLIRUBIN_MIN has 1104 records (57.35%) with missing values. Variable BILLIRUBIN_MAX has 1104 records (57.35%) with missing values. Variable BILLIRUBIN_DIFF has 1104 records (57.35%) with missing values. Variable BLAST_MEDIAN has 1104 records (57.35%) with missing values. Variable BLAST_MEAN has 1104 records (57.35%) with missing values. Variable BLAST_MIN has 1104 records (57.35%) with missing values. Variable BLAST_MAX has 1104 records (57.35%) with missing values. Variable BLAST_DIFF has 1104 records (57.35%) with missing values. Variable CALCIUM_MEDIAN has 1104 records (57.35%) with missing values. Variable CALCIUM_MEAN has 1104 records (57.35%) with missing values. Variable CALCIUM_MIN has 1104 records (57.35%) with missing values. Variable CALCIUM_MAX has 1104 records (57.35%) with missing values. Variable CALCIUM_DIFF has 1104 records (57.35%) with missing values. Variable CREATININ_MEDIAN has 1104 records (57.35%) with missing values. Variable CREATININ_MEAN has 1104 records (57.35%) with missing values. Variable CREATININ_MIN has 1104 records (57.35%) with missing values. Variable CREATININ_MAX has 1104 records (57.35%) with missing values. Variable CREATININ_DIFF has 1104 records (57.35%) with missing values. Variable FFA_MEDIAN has 1104 records (57.35%) with missing values. Variable FFA_MEAN has 1104 records (57.35%) with missing values. Variable FFA_MIN has 1104 records (57.35%) with missing values. Variable FFA_MAX has 1104 records (57.35%) with missing values. Variable FFA_DIFF has 1104 records (57.35%) with missing values. Variable GGT_MEDIAN has 1104 records (57.35%) with missing values. Variable GGT_MEAN has 1104 records (57.35%) with missing values. Variable GGT_MIN has 1104 records (57.35%) with missing values. Variable GGT_MAX has 1104 records (57.35%) with missing values. Variable GGT_DIFF has 1104 records (57.35%) with missing values. Variable GLUCOSE_MEDIAN has 1104 records (57.35%) with missing values. Variable GLUCOSE_MEAN has 1104 records (57.35%) with missing values. Variable GLUCOSE_MIN has 1104 records (57.35%) with missing values. Variable GLUCOSE_MAX has 1104 records (57.35%) with missing values. Variable GLUCOSE_DIFF has 1104 records (57.35%) with missing values. Variable HEMATOCRITE_MEDIAN has 1104 records (57.35%) with missing values. Variable HEMATOCRITE_MEAN has 1104 records (57.35%) with missing values. Variable HEMATOCRITE_MIN has 1104 records (57.35%) with missing values. Variable HEMATOCRITE_MAX has 1104 records (57.35%) with missing values. Variable HEMATOCRITE_DIFF has 1104 records (57.35%) with missing values. Variable HEMOGLOBIN_MEDIAN has 1104 records (57.35%) with missing values. Variable HEMOGLOBIN_MEAN has 1104 records (57.35%) with missing values. Variable HEMOGLOBIN_MIN has 1104 records (57.35%) with missing values. Variable HEMOGLOBIN_MAX has 1104 records (57.35%) with missing values. Variable HEMOGLOBIN_DIFF has 1104 records (57.35%) with missing values. Variable INR_MEDIAN has 1104 records (57.35%) with missing values. Variable INR_MEAN has 1104 records (57.35%) with missing values. Variable INR_MIN has 1104 records (57.35%) with missing values. Variable INR_MAX has 1104 records (57.35%) with missing values. Variable INR_DIFF has 1104 records (57.35%) with missing values. Variable LACTATE_MEDIAN has 1104 records (57.35%) with missing values. Variable LACTATE_MEAN has 1104 records (57.35%) with missing values. Variable LACTATE_MIN has 1104 records (57.35%) with missing values. Variable LACTATE_MAX has 1104 records (57.35%) with missing values. Variable LACTATE_DIFF has 1104 records (57.35%) with missing values. Variable LEUKOCYTES_MEDIAN has 1104 records (57.35%) with missing values. Variable LEUKOCYTES_MEAN has 1104 records (57.35%) with missing values. Variable LEUKOCYTES_MIN has 1104 records (57.35%) with missing values. Variable LEUKOCYTES_MAX has 1104 records (57.35%) with missing values. Variable LEUKOCYTES_DIFF has 1104 records (57.35%) with missing values. Variable LINFOCITOS_MEDIAN has 1104 records (57.35%) with missing values. Variable LINFOCITOS_MEAN has 1104 records (57.35%) with missing values. Variable LINFOCITOS_MIN has 1104 records (57.35%) with missing values. Variable LINFOCITOS_MAX has 1104 records (57.35%) with missing values. Variable LINFOCITOS_DIFF has 1104 records (57.35%) with missing values. Variable NEUTROPHILES_MEDIAN has 1104 records (57.35%) with missing values. Variable NEUTROPHILES_MEAN has 1104 records (57.35%) with missing values. Variable NEUTROPHILES_MIN has 1104 records (57.35%) with missing values. Variable NEUTROPHILES_MAX has 1104 records (57.35%) with missing values. Variable NEUTROPHILES_DIFF has 1104 records (57.35%) with missing values. Variable P02_ARTERIAL_MEDIAN has 1104 records (57.35%) with missing values. Variable P02_ARTERIAL_MEAN has 1104 records (57.35%) with missing values. Variable P02_ARTERIAL_MIN has 1104 records (57.35%) with missing values. Variable P02_ARTERIAL_MAX has 1104 records (57.35%) with missing values. Variable P02_ARTERIAL_DIFF has 1104 records (57.35%) with missing values. Variable P02_VENOUS_MEDIAN has 1104 records (57.35%) with missing values. Variable P02_VENOUS_MEAN has 1104 records (57.35%) with missing values. Variable P02_VENOUS_MIN has 1104 records (57.35%) with missing values. Variable P02_VENOUS_MAX has 1104 records (57.35%) with missing values. Variable P02_VENOUS_DIFF has 1104 records (57.35%) with missing values. Variable PC02_ARTERIAL_MEDIAN has 1104 records (57.35%) with missing values. Variable PC02_ARTERIAL_MEAN has 1104 records (57.35%) with missing values. Variable PC02_ARTERIAL_MIN has 1104 records (57.35%) with missing values. Variable PC02_ARTERIAL_MAX has 1104 records (57.35%) with missing values. Variable PC02_ARTERIAL_DIFF has 1104 records (57.35%) with missing values. Variable PC02_VENOUS_MEDIAN has 1104 records (57.35%) with missing values. Variable PC02_VENOUS_MEAN has 1104 records (57.35%) with missing values. Variable PC02_VENOUS_MIN has 1104 records (57.35%) with missing values. Variable PC02_VENOUS_MAX has 1104 records (57.35%) with missing values. Variable PC02_VENOUS_DIFF has 1104 records (57.35%) with missing values. Variable PCR_MEDIAN has 1104 records (57.35%) with missing values. Variable PCR_MEAN has 1104 records (57.35%) with missing values. Variable PCR_MIN has 1104 records (57.35%) with missing values. Variable PCR_MAX has 1104 records (57.35%) with missing values. Variable PCR_DIFF has 1104 records (57.35%) with missing values. Variable PH_ARTERIAL_MEDIAN has 1104 records (57.35%) with missing values. Variable PH_ARTERIAL_MEAN has 1104 records (57.35%) with missing values. Variable PH_ARTERIAL_MIN has 1104 records (57.35%) with missing values. Variable PH_ARTERIAL_MAX has 1104 records (57.35%) with missing values. Variable PH_ARTERIAL_DIFF has 1104 records (57.35%) with missing values. Variable PH_VENOUS_MEDIAN has 1104 records (57.35%) with missing values. Variable PH_VENOUS_MEAN has 1104 records (57.35%) with missing values. Variable PH_VENOUS_MIN has 1104 records (57.35%) with missing values. Variable PH_VENOUS_MAX has 1104 records (57.35%) with missing values. Variable PH_VENOUS_DIFF has 1104 records (57.35%) with missing values. Variable PLATELETS_MEDIAN has 1104 records (57.35%) with missing values. Variable PLATELETS_MEAN has 1104 records (57.35%) with missing values. Variable PLATELETS_MIN has 1104 records (57.35%) with missing values. Variable PLATELETS_MAX has 1104 records (57.35%) with missing values. Variable PLATELETS_DIFF has 1104 records (57.35%) with missing values. Variable POTASSIUM_MEDIAN has 1104 records (57.35%) with missing values. Variable POTASSIUM_MEAN has 1104 records (57.35%) with missing values. Variable POTASSIUM_MIN has 1104 records (57.35%) with missing values. Variable POTASSIUM_MAX has 1104 records (57.35%) with missing values. Variable POTASSIUM_DIFF has 1104 records (57.35%) with missing values. Variable SAT02_ARTERIAL_MEDIAN has 1104 records (57.35%) with missing values. Variable SAT02_ARTERIAL_MEAN has 1104 records (57.35%) with missing values. Variable SAT02_ARTERIAL_MIN has 1104 records (57.35%) with missing values. Variable SAT02_ARTERIAL_MAX has 1104 records (57.35%) with missing values. Variable SAT02_ARTERIAL_DIFF has 1104 records (57.35%) with missing values. Variable SAT02_VENOUS_MEDIAN has 1104 records (57.35%) with missing values. Variable SAT02_VENOUS_MEAN has 1104 records (57.35%) with missing values. Variable SAT02_VENOUS_MIN has 1104 records (57.35%) with missing values. Variable SAT02_VENOUS_MAX has 1104 records (57.35%) with missing values. Variable SAT02_VENOUS_DIFF has 1104 records (57.35%) with missing values. Variable SODIUM_MEDIAN has 1104 records (57.35%) with missing values. Variable SODIUM_MEAN has 1104 records (57.35%) with missing values. Variable SODIUM_MIN has 1104 records (57.35%) with missing values. Variable SODIUM_MAX has 1104 records (57.35%) with missing values. Variable SODIUM_DIFF has 1104 records (57.35%) with missing values. Variable TGO_MEDIAN has 1104 records (57.35%) with missing values. Variable TGO_MEAN has 1104 records (57.35%) with missing values. Variable TGO_MIN has 1104 records (57.35%) with missing values. Variable TGO_MAX has 1104 records (57.35%) with missing values. Variable TGO_DIFF has 1104 records (57.35%) with missing values. Variable TGP_MEDIAN has 1104 records (57.35%) with missing values. Variable TGP_MEAN has 1104 records (57.35%) with missing values. Variable TGP_MIN has 1104 records (57.35%) with missing values. Variable TGP_MAX has 1104 records (57.35%) with missing values. Variable TGP_DIFF has 1104 records (57.35%) with missing values. Variable TTPA_MEDIAN has 1104 records (57.35%) with missing values. Variable TTPA_MEAN has 1104 records (57.35%) with missing values. Variable TTPA_MIN has 1104 records (57.35%) with missing values. Variable TTPA_MAX has 1104 records (57.35%) with missing values. Variable TTPA_DIFF has 1104 records (57.35%) with missing values. Variable UREA_MEDIAN has 1104 records (57.35%) with missing values. Variable UREA_MEAN has 1104 records (57.35%) with missing values. Variable UREA_MIN has 1104 records (57.35%) with missing values. Variable UREA_MAX has 1104 records (57.35%) with missing values. Variable UREA_DIFF has 1104 records (57.35%) with missing values. Variable DIMER_MEDIAN has 1104 records (57.35%) with missing values. Variable DIMER_MEAN has 1104 records (57.35%) with missing values. Variable DIMER_MIN has 1104 records (57.35%) with missing values. Variable DIMER_MAX has 1104 records (57.35%) with missing values. Variable DIMER_DIFF has 1104 records (57.35%) with missing values. Variable BLOODPRESSURE_DIASTOLIC_MEAN has 685 records (35.58%) with missing values. Variable BLOODPRESSURE_SISTOLIC_MEAN has 685 records (35.58%) with missing values. Variable HEART_RATE_MEAN has 685 records (35.58%) with missing values. Variable RESPIRATORY_RATE_MEAN has 748 records (38.86%) with missing values. Variable TEMPERATURE_MEAN has 694 records (36.05%) with missing values. Variable OXYGEN_SATURATION_MEAN has 686 records (35.64%) with missing values. Variable BLOODPRESSURE_DIASTOLIC_MEDIAN has 685 records (35.58%) with missing values. Variable BLOODPRESSURE_SISTOLIC_MEDIAN has 685 records (35.58%) with missing values. Variable HEART_RATE_MEDIAN has 685 records (35.58%) with missing values. Variable RESPIRATORY_RATE_MEDIAN has 748 records (38.86%) with missing values. Variable TEMPERATURE_MEDIAN has 694 records (36.05%) with missing values. Variable OXYGEN_SATURATION_MEDIAN has 686 records (35.64%) with missing values. Variable BLOODPRESSURE_DIASTOLIC_MIN has 685 records (35.58%) with missing values. Variable BLOODPRESSURE_SISTOLIC_MIN has 685 records (35.58%) with missing values. Variable HEART_RATE_MIN has 685 records (35.58%) with missing values. Variable RESPIRATORY_RATE_MIN has 748 records (38.86%) with missing values. Variable TEMPERATURE_MIN has 694 records (36.05%) with missing values. Variable OXYGEN_SATURATION_MIN has 686 records (35.64%) with missing values. Variable BLOODPRESSURE_DIASTOLIC_MAX has 685 records (35.58%) with missing values. Variable BLOODPRESSURE_SISTOLIC_MAX has 685 records (35.58%) with missing values. Variable HEART_RATE_MAX has 685 records (35.58%) with missing values. Variable RESPIRATORY_RATE_MAX has 748 records (38.86%) with missing values. Variable TEMPERATURE_MAX has 694 records (36.05%) with missing values. Variable OXYGEN_SATURATION_MAX has 686 records (35.64%) with missing values. Variable BLOODPRESSURE_DIASTOLIC_DIFF has 685 records (35.58%) with missing values. Variable BLOODPRESSURE_SISTOLIC_DIFF has 685 records (35.58%) with missing values. Variable HEART_RATE_DIFF has 685 records (35.58%) with missing values. Variable RESPIRATORY_RATE_DIFF has 748 records (38.86%) with missing values. Variable TEMPERATURE_DIFF has 694 records (36.05%) with missing values. Variable OXYGEN_SATURATION_DIFF has 686 records (35.64%) with missing values. Variable BLOODPRESSURE_DIASTOLIC_DIFF_REL has 685 records (35.58%) with missing values. Variable BLOODPRESSURE_SISTOLIC_DIFF_REL has 685 records (35.58%) with missing values. Variable HEART_RATE_DIFF_REL has 685 records (35.58%) with missing values. Variable RESPIRATORY_RATE_DIFF_REL has 748 records (38.86%) with missing values. Variable TEMPERATURE_DIFF_REL has 694 records (36.05%) with missing values. Variable OXYGEN_SATURATION_DIFF_REL has 686 records (35.64%) with missing values. In total, there are 225 variables with missing values
msno.matrix(data)
<matplotlib.axes._subplots.AxesSubplot at 0x7fcae17b13d0>
msno.bar(data)
<matplotlib.axes._subplots.AxesSubplot at 0x7fcae175e590>
msno.heatmap(data)
<matplotlib.axes._subplots.AxesSubplot at 0x7fcad56613d0>
df_missing_data = pd.DataFrame({'column':data.columns, 'missing(%)':((data.isna()).sum()/data.shape[0])*100})
df_missing_data_nl = df_missing_data.nlargest(10, 'missing(%)')
sns.set_palette(sns.color_palette('nipy_spectral'))
sns.barplot(data=df_missing_data_nl, x='column', y='missing(%)', )
plt.title('Missing values (%) in the dataset')
locs, labels = plt.xticks()
plt.setp(labels, rotation=90)
plt.show()
Obs: We can see that the is a huge percentage of missing data in the dataset.
There are 225 variables with missing values and in total, 223863 NaN values.
Missing values in medical data is a common issue. However, according to the outhors of the dataset, we can assume the patients that don't have a measurement recorded are clinically stable and there is a possibility that they have vital signs and blood labs similar to neighboring windows. Therefore, we can deal with missing values by filling them using the next or previous entry, in the data preparation step.
var = meta2[(meta2.type == 'binary') & (meta2.preserve)].index
data[var].describe()
AGE_ABOVE65 | GENDER | DISEASE GROUPING 1 | DISEASE GROUPING 2 | DISEASE GROUPING 3 | DISEASE GROUPING 4 | DISEASE GROUPING 5 | DISEASE GROUPING 6 | HTN | IMMUNOCOMPROMISED | OTHER | ICU | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
count | 1925.000000 | 1925.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1920.000000 | 1925.000000 |
mean | 0.467532 | 0.368831 | 0.108333 | 0.028125 | 0.097917 | 0.019792 | 0.128125 | 0.046875 | 0.213021 | 0.158333 | 0.809896 | 0.267532 |
std | 0.499074 | 0.482613 | 0.310882 | 0.165373 | 0.297279 | 0.139320 | 0.334316 | 0.211426 | 0.409549 | 0.365148 | 0.392485 | 0.442787 |
min | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
25% | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 |
50% | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 |
75% | 1.000000 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 1.000000 |
max | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 |
Obs:
(From the discussion section in the kaggle competition there is a discussion that explains that 0 values in the gender variable represent males while 1's represent females).
binary = ['AGE_ABOVE65', 'GENDER', 'IMMUNOCOMPROMISED',
'DISEASE GROUPING 1', 'DISEASE GROUPING 2',
'DISEASE GROUPING 3', 'DISEASE GROUPING 4',
'DISEASE GROUPING 5', 'DISEASE GROUPING 6', 'OTHER']
zero_list = []
one_list = []
for col in binary:
zero_list.append((data[col]==0).sum()/data.shape[0]*100)
one_list.append((data[col]==1).sum()/data.shape[0]*100)
plt.figure()
fig, ax = plt.subplots(figsize=(6,6))
# Bar plot
p1 = sns.barplot(ax=ax, x=binary, y=zero_list, color="blue")
p2 = sns.barplot(ax=ax, x=binary, y=one_list, bottom= zero_list, color="red")
plt.ylabel('Percent of zero/one [%]', fontsize=12)
plt.xlabel('Binary features', fontsize=12)
locs, labels = plt.xticks()
plt.setp(labels, rotation=90)
plt.tick_params(axis='both', which='major', labelsize=12)
plt.show();
<Figure size 432x288 with 0 Axes>
#Plot gender distribution
plt.title('Gender class count')
sns.countplot(data['GENDER'], palette='nipy_spectral' )
plt.tight_layout()
# count and print nº of male and female patients
class_1 = len(data[data['GENDER']==1])/5
class_0 = len(data[data['GENDER']==0])/5
print('Males: {}'.format(class_0))
print('Females: {}'.format(class_1))
Males: 243.0 Females: 142.0
/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variable as a keyword arg: x. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. FutureWarning
In our dataset there are 243 males and 142 females.
disease = data[['DISEASE GROUPING 1', 'DISEASE GROUPING 2',
'DISEASE GROUPING 3', 'DISEASE GROUPING 4',
'DISEASE GROUPING 5', 'DISEASE GROUPING 6', 'HTN',
'IMMUNOCOMPROMISED', 'OTHER', 'ICU']]
sns.barplot(x='variable', y='value', data=disease.melt(id_vars='ICU'),
hue='ICU', palette='nipy_spectral')
plt.title('Patients on ICU by Group of disease', loc='left')
plt.ylabel('Frequency')
plt.xlabel('Disease')
plt.xticks(rotation=85);
Obs: With the the exception of the disease group 6 patienst with a disease have higher ICU admitions frequency.
#Cardinality of data
var = meta2[(meta2.type == 'categorical') & (meta2.preserve)].index
for feature in var:
dist_values = data[feature].value_counts().shape[0]
print('Variable {} has {} distinct values'.format(feature, dist_values))
Variable AGE_PERCENTIL has 10 distinct values Variable WINDOW has 5 distinct values
var = meta2[(meta2.type == 'categorical') & (meta2.preserve)].index
for feature in var:
dist_values = data[feature].value_counts().shape[0]
print('Variable {} has {} distinct values'.format(feature, dist_values))
Variable AGE_PERCENTIL has 10 distinct values Variable WINDOW has 5 distinct values
# age / ICU admin
plt.figure(figsize=(12,10))
plt.subplot(2,1,1)
plt.title('Age | ICU ')
sort=data[['AGE_PERCENTIL', 'ICU']].groupby(['AGE_PERCENTIL'],as_index=False).mean()
sort.sort_values(by='ICU', ascending=False, inplace=True)
sns.countplot(data['AGE_PERCENTIL'], hue='ICU', data=data, palette='nipy_spectral', order=sort['AGE_PERCENTIL'])
/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variable as a keyword arg: x. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. FutureWarning
<matplotlib.axes._subplots.AxesSubplot at 0x7fcac8064e90>
# window / ICU adm
plt.figure()
plt.title(' window | ICU ')
sns.countplot(data['WINDOW'], hue='ICU', data=data, palette='nipy_spectral')
plt.show()
/usr/local/lib/python3.7/dist-packages/seaborn/_decorators.py:43: FutureWarning: Pass the following variable as a keyword arg: x. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. FutureWarning
Obs:
real = meta2[(meta2.type == 'real') & (meta2.preserve)].index
data[real].describe()
ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
count | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 |
mean | 0.528527 | 0.528527 | 0.528527 | 0.528527 | -1.0 | -0.963433 | -0.963433 | -0.963433 | -0.963433 | -1.0 | -0.931121 | -0.931121 | -0.931121 | -0.931121 | -1.0 | -0.310924 | -0.310924 | -0.310924 | -0.310924 | -1.0 | -0.311845 | -0.311845 | -0.311845 | -0.311845 | -1.0 | -0.945928 | -0.945928 | -0.945928 | -0.945928 | -1.0 | -0.994424 | -0.994424 | -0.994424 | -0.994424 | -1.0 | 0.330359 | 0.330359 | 0.330359 | 0.330359 | -1.0 | -0.891078 | -0.891078 | -0.891078 | -0.891078 | -1.0 | -0.723217 | -0.723217 | -0.723217 | -0.723217 | -1.0 | -0.920403 | -0.920403 | -0.920403 | -0.920403 | -1.0 | -0.861694 | -0.861694 | -0.861694 | -0.861694 | -1.0 | -0.160818 | -0.160818 | -0.160818 | -0.160818 | -1.0 | -0.202472 | -0.202472 | -0.202472 | -0.202472 | -1.0 | -0.936950 | -0.936950 | -0.936950 | -0.936950 | -1.0 | 0.267131 | 0.267131 | 0.267131 | 0.267131 | -1.0 | -0.741266 | -0.741266 | -0.741266 | -0.741266 | -1.0 | -0.710390 | -0.710390 | -0.710390 | -0.710390 | -1.0 | -0.812662 | -0.812662 | -0.812662 | -0.812662 | -1.0 | -0.175886 | -0.175886 | -0.175886 | -0.175886 | -1.0 | -0.675342 | -0.675342 | -0.675342 | -0.675342 | -1.0 | -0.777664 | -0.777664 | -0.777664 | -0.777664 | -1.0 | -0.755797 | -0.755797 | -0.755797 | -0.755797 | -1.0 | -0.845570 | -0.845570 | -0.845570 | -0.845570 | -1.0 | 0.236997 | 0.236997 | 0.236997 | 0.236997 | -1.0 | 0.369007 | 0.369007 | 0.369007 | 0.369007 | -1.0 | -0.414479 | -0.414479 | -0.414479 | -0.414479 | -1.0 | -0.525624 | -0.525624 | -0.525624 | -0.525624 | -1.0 | 0.914277 | 0.914277 | 0.914277 | 0.914277 | -1.0 | 0.331965 | 0.331965 | 0.331965 | 0.331965 | -1.0 | -0.053060 | -0.053060 | -0.053060 | -0.053060 | -1.0 | -0.991054 | -0.991054 | -0.991054 | -0.991054 | -1.0 | -0.982156 | -0.982156 | -0.982156 | -0.982156 | -1.0 | -0.822280 | -0.822280 | -0.822280 | -0.822280 | -1.0 | -0.830181 | -0.830181 | -0.830181 | -0.830181 | -1.0 | -0.954177 | -0.954177 | -0.954177 | -0.954177 | -1.0 | -0.093631 | -0.332600 | -0.264701 | -0.438754 | 0.066893 | 0.743077 | -0.097790 | -0.338468 | -0.268632 | -0.435121 | 0.063798 | 0.748588 | -0.040855 | -0.207812 | -0.264999 | -0.483129 | 0.326823 | 0.817565 | -0.235001 | -0.399582 | -0.282029 | -0.316753 | 0.014964 | 0.818593 | -0.752454 | -0.728053 | -0.754100 | -0.703683 | -0.770338 | -0.887196 | -0.786997 | -0.715950 | -0.817800 | -0.719147 | -0.771327 | -0.886982 |
std | 0.224100 | 0.224100 | 0.224100 | 0.224100 | 0.0 | 0.160870 | 0.160870 | 0.160870 | 0.160870 | 0.0 | 0.169509 | 0.169509 | 0.169509 | 0.169509 | 0.0 | 0.100256 | 0.100256 | 0.100256 | 0.100256 | 0.0 | 0.118812 | 0.118812 | 0.118812 | 0.118812 | 0.0 | 0.076610 | 0.076610 | 0.076610 | 0.076610 | 0.0 | 0.098000 | 0.098000 | 0.098000 | 0.098000 | 0.0 | 0.126224 | 0.126224 | 0.126224 | 0.126224 | 0.0 | 0.115901 | 0.115901 | 0.115901 | 0.115901 | 0.0 | 0.171244 | 0.171244 | 0.171244 | 0.171244 | 0.0 | 0.152341 | 0.152341 | 0.152341 | 0.152341 | 0.0 | 0.115752 | 0.115752 | 0.115752 | 0.115752 | 0.0 | 0.238530 | 0.238530 | 0.238530 | 0.238530 | 0.0 | 0.253605 | 0.253605 | 0.253605 | 0.253605 | 0.0 | 0.086125 | 0.086125 | 0.086125 | 0.086125 | 0.0 | 0.923557 | 0.923557 | 0.923557 | 0.923557 | 0.0 | 0.149095 | 0.149095 | 0.149095 | 0.149095 | 0.0 | 0.167796 | 0.167796 | 0.167796 | 0.167796 | 0.0 | 0.146085 | 0.146085 | 0.146085 | 0.146085 | 0.0 | 0.158109 | 0.158109 | 0.158109 | 0.158109 | 0.0 | 0.152190 | 0.152190 | 0.152190 | 0.152190 | 0.0 | 0.073097 | 0.073097 | 0.073097 | 0.073097 | 0.0 | 0.095193 | 0.095193 | 0.095193 | 0.095193 | 0.0 | 0.245238 | 0.245238 | 0.245238 | 0.245238 | 0.0 | 0.129574 | 0.129574 | 0.129574 | 0.129574 | 0.0 | 0.130906 | 0.130906 | 0.130906 | 0.130906 | 0.0 | 0.273767 | 0.273767 | 0.273767 | 0.273767 | 0.0 | 0.188882 | 0.188882 | 0.188882 | 0.188882 | 0.0 | 0.149537 | 0.149537 | 0.149537 | 0.149537 | 0.0 | 0.305148 | 0.305148 | 0.305148 | 0.305148 | 0.0 | 0.205937 | 0.205937 | 0.205937 | 0.205937 | 0.0 | 0.074863 | 0.074863 | 0.074863 | 0.074863 | 0.0 | 0.071975 | 0.071975 | 0.071975 | 0.071975 | 0.0 | 0.115288 | 0.115288 | 0.115288 | 0.115288 | 0.0 | 0.150934 | 0.150934 | 0.150934 | 0.150934 | 0.0 | 0.123582 | 0.123582 | 0.123582 | 0.123582 | 0.0 | 0.252064 | 0.274102 | 0.246760 | 0.217113 | 0.242858 | 0.132635 | 0.257733 | 0.277952 | 0.252709 | 0.225554 | 0.249208 | 0.125994 | 0.281304 | 0.277802 | 0.272725 | 0.278239 | 0.216198 | 0.283453 | 0.271123 | 0.287580 | 0.296247 | 0.402675 | 0.276163 | 0.141316 | 0.364001 | 0.408677 | 0.366349 | 0.482097 | 0.319001 | 0.296147 | 0.324754 | 0.419103 | 0.270217 | 0.446600 | 0.317694 | 0.296772 |
min | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 |
25% | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.966510 | -0.966510 | -0.966510 | -0.966510 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.306122 | 0.306122 | 0.306122 | 0.306122 | -1.0 | -0.930644 | -0.930644 | -0.930644 | -0.930644 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.291405 | -0.291405 | -0.291405 | -0.291405 | -1.0 | -0.341463 | -0.341463 | -0.341463 | -0.341463 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | -0.894695 | -0.894695 | -0.894695 | -0.894695 | -1.0 | -0.832368 | -0.832368 | -0.832368 | -0.832368 | -1.0 | -0.827801 | -0.827801 | -0.827801 | -0.827801 | -1.0 | -0.896759 | -0.896759 | -0.896759 | -0.896759 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.982231 | -0.982231 | -0.982231 | -0.982231 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.604806 | -0.604806 | -0.604806 | -0.604806 | -1.0 | -0.629630 | -0.629630 | -0.629630 | -0.629630 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.142857 | -0.142857 | -0.142857 | -0.142857 | -1.0 | -0.996827 | -0.996827 | -0.996827 | -0.996827 | -1.0 | -0.993521 | -0.993521 | -0.993521 | -0.993521 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.898795 | -0.898795 | -0.898795 | -0.898795 | -1.0 | -0.978877 | -0.978877 | -0.978877 | -0.978877 | -1.0 | -0.262708 | -0.523077 | -0.420791 | -0.552542 | -0.102991 | 0.684211 | -0.283951 | -0.538462 | -0.433962 | -0.517241 | -0.107143 | 0.684211 | -0.195876 | -0.375000 | -0.452991 | -0.642857 | 0.186813 | 0.818182 | -0.418803 | -0.578378 | -0.477612 | -0.575758 | -0.188406 | 0.736842 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 |
50% | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.909413 | -0.909413 | -0.909413 | -0.909413 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.132075 | -0.132075 | -0.132075 | -0.132075 | -1.0 | -0.182927 | -0.182927 | -0.182927 | -0.182927 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.773658 | -0.773658 | -0.773658 | -0.773658 | -1.0 | -0.736515 | -0.736515 | -0.736515 | -0.736515 | -1.0 | -0.847139 | -0.847139 | -0.847139 | -0.847139 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.942911 | -0.942911 | -0.942911 | -0.942911 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.463284 | -0.463284 | -0.463284 | -0.463284 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.995428 | -0.995428 | -0.995428 | -0.995428 | -1.0 | -0.986662 | -0.986662 | -0.986662 | -0.986662 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.874699 | -0.874699 | -0.874699 | -0.874699 | -1.0 | -0.978029 | -0.978029 | -0.978029 | -0.978029 | -1.0 | -0.100172 | -0.374405 | -0.283019 | -0.502825 | 0.035714 | 0.736842 | -0.135802 | -0.384615 | -0.283019 | -0.517241 | 0.035714 | 0.736842 | -0.030928 | -0.250000 | -0.282051 | -0.500000 | 0.318681 | 0.878788 | -0.247863 | -0.459459 | -0.328358 | -0.454545 | -0.014493 | 0.842105 | -1.000000 | -0.987730 | -0.984733 | -1.000000 | -0.976190 | -0.979798 | -1.000000 | -0.984944 | -0.989822 | -1.000000 | -0.975924 | -0.980333 |
75% | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.958115 | -0.958115 | -0.958115 | -0.958115 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.886766 | -0.886766 | -0.886766 | -0.886766 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.956776 | -0.956776 | -0.956776 | -0.956776 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.002096 | -0.002096 | -0.002096 | -0.002096 | -1.0 | -0.024390 | -0.024390 | -0.024390 | -0.024390 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.702588 | -0.702588 | -0.702588 | -0.702588 | -1.0 | -0.614108 | -0.614108 | -0.614108 | -0.614108 | -1.0 | -0.780312 | -0.780312 | -0.780312 | -0.780312 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.815123 | -0.815123 | -0.815123 | -0.815123 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.228304 | -0.228304 | -0.228304 | -0.228304 | -1.0 | -0.444444 | -0.444444 | -0.444444 | -0.444444 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.066667 | 0.066667 | 0.066667 | 0.066667 | -1.0 | -0.994961 | -0.994961 | -0.994961 | -0.994961 | -1.0 | -0.984756 | -0.984756 | -0.984756 | -0.984756 | -1.0 | -0.836512 | -0.836512 | -0.836512 | -0.836512 | -1.0 | -0.812048 | -0.812048 | -0.812048 | -0.812048 | -1.0 | -0.968315 | -0.968315 | -0.968315 | -0.968315 | -1.0 | 0.086420 | -0.184615 | -0.132075 | -0.383289 | 0.205890 | 0.823995 | 0.086420 | -0.200000 | -0.132075 | -0.379310 | 0.196429 | 0.842105 | 0.175258 | -0.050000 | -0.094017 | -0.357143 | 0.472527 | 0.919192 | -0.076923 | -0.243243 | -0.119403 | -0.212121 | 0.217391 | 0.894737 | -0.565217 | -0.558282 | -0.541985 | -0.647059 | -0.595238 | -0.878788 | -0.645482 | -0.522176 | -0.662529 | -0.634409 | -0.594677 | -0.880155 |
max | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 |
We will visualise the relationship between features in the real variables using correlation matrix
variable = meta2[(meta2.type == 'real') & (meta2.preserve)].index
data[variable].describe()
ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
count | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 821.000000 | 821.000000 | 821.000000 | 821.000000 | 821.0 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 | 1240.000000 | 1240.000000 | 1240.000000 | 1177.000000 | 1231.000000 | 1239.000000 |
mean | 0.528527 | 0.528527 | 0.528527 | 0.528527 | -1.0 | -0.963433 | -0.963433 | -0.963433 | -0.963433 | -1.0 | -0.931121 | -0.931121 | -0.931121 | -0.931121 | -1.0 | -0.310924 | -0.310924 | -0.310924 | -0.310924 | -1.0 | -0.311845 | -0.311845 | -0.311845 | -0.311845 | -1.0 | -0.945928 | -0.945928 | -0.945928 | -0.945928 | -1.0 | -0.994424 | -0.994424 | -0.994424 | -0.994424 | -1.0 | 0.330359 | 0.330359 | 0.330359 | 0.330359 | -1.0 | -0.891078 | -0.891078 | -0.891078 | -0.891078 | -1.0 | -0.723217 | -0.723217 | -0.723217 | -0.723217 | -1.0 | -0.920403 | -0.920403 | -0.920403 | -0.920403 | -1.0 | -0.861694 | -0.861694 | -0.861694 | -0.861694 | -1.0 | -0.160818 | -0.160818 | -0.160818 | -0.160818 | -1.0 | -0.202472 | -0.202472 | -0.202472 | -0.202472 | -1.0 | -0.936950 | -0.936950 | -0.936950 | -0.936950 | -1.0 | 0.267131 | 0.267131 | 0.267131 | 0.267131 | -1.0 | -0.741266 | -0.741266 | -0.741266 | -0.741266 | -1.0 | -0.710390 | -0.710390 | -0.710390 | -0.710390 | -1.0 | -0.812662 | -0.812662 | -0.812662 | -0.812662 | -1.0 | -0.175886 | -0.175886 | -0.175886 | -0.175886 | -1.0 | -0.675342 | -0.675342 | -0.675342 | -0.675342 | -1.0 | -0.777664 | -0.777664 | -0.777664 | -0.777664 | -1.0 | -0.755797 | -0.755797 | -0.755797 | -0.755797 | -1.0 | -0.845570 | -0.845570 | -0.845570 | -0.845570 | -1.0 | 0.236997 | 0.236997 | 0.236997 | 0.236997 | -1.0 | 0.369007 | 0.369007 | 0.369007 | 0.369007 | -1.0 | -0.414479 | -0.414479 | -0.414479 | -0.414479 | -1.0 | -0.525624 | -0.525624 | -0.525624 | -0.525624 | -1.0 | 0.914277 | 0.914277 | 0.914277 | 0.914277 | -1.0 | 0.331965 | 0.331965 | 0.331965 | 0.331965 | -1.0 | -0.053060 | -0.053060 | -0.053060 | -0.053060 | -1.0 | -0.991054 | -0.991054 | -0.991054 | -0.991054 | -1.0 | -0.982156 | -0.982156 | -0.982156 | -0.982156 | -1.0 | -0.822280 | -0.822280 | -0.822280 | -0.822280 | -1.0 | -0.830181 | -0.830181 | -0.830181 | -0.830181 | -1.0 | -0.954177 | -0.954177 | -0.954177 | -0.954177 | -1.0 | -0.093631 | -0.332600 | -0.264701 | -0.438754 | 0.066893 | 0.743077 | -0.097790 | -0.338468 | -0.268632 | -0.435121 | 0.063798 | 0.748588 | -0.040855 | -0.207812 | -0.264999 | -0.483129 | 0.326823 | 0.817565 | -0.235001 | -0.399582 | -0.282029 | -0.316753 | 0.014964 | 0.818593 | -0.752454 | -0.728053 | -0.754100 | -0.703683 | -0.770338 | -0.887196 | -0.786997 | -0.715950 | -0.817800 | -0.719147 | -0.771327 | -0.886982 |
std | 0.224100 | 0.224100 | 0.224100 | 0.224100 | 0.0 | 0.160870 | 0.160870 | 0.160870 | 0.160870 | 0.0 | 0.169509 | 0.169509 | 0.169509 | 0.169509 | 0.0 | 0.100256 | 0.100256 | 0.100256 | 0.100256 | 0.0 | 0.118812 | 0.118812 | 0.118812 | 0.118812 | 0.0 | 0.076610 | 0.076610 | 0.076610 | 0.076610 | 0.0 | 0.098000 | 0.098000 | 0.098000 | 0.098000 | 0.0 | 0.126224 | 0.126224 | 0.126224 | 0.126224 | 0.0 | 0.115901 | 0.115901 | 0.115901 | 0.115901 | 0.0 | 0.171244 | 0.171244 | 0.171244 | 0.171244 | 0.0 | 0.152341 | 0.152341 | 0.152341 | 0.152341 | 0.0 | 0.115752 | 0.115752 | 0.115752 | 0.115752 | 0.0 | 0.238530 | 0.238530 | 0.238530 | 0.238530 | 0.0 | 0.253605 | 0.253605 | 0.253605 | 0.253605 | 0.0 | 0.086125 | 0.086125 | 0.086125 | 0.086125 | 0.0 | 0.923557 | 0.923557 | 0.923557 | 0.923557 | 0.0 | 0.149095 | 0.149095 | 0.149095 | 0.149095 | 0.0 | 0.167796 | 0.167796 | 0.167796 | 0.167796 | 0.0 | 0.146085 | 0.146085 | 0.146085 | 0.146085 | 0.0 | 0.158109 | 0.158109 | 0.158109 | 0.158109 | 0.0 | 0.152190 | 0.152190 | 0.152190 | 0.152190 | 0.0 | 0.073097 | 0.073097 | 0.073097 | 0.073097 | 0.0 | 0.095193 | 0.095193 | 0.095193 | 0.095193 | 0.0 | 0.245238 | 0.245238 | 0.245238 | 0.245238 | 0.0 | 0.129574 | 0.129574 | 0.129574 | 0.129574 | 0.0 | 0.130906 | 0.130906 | 0.130906 | 0.130906 | 0.0 | 0.273767 | 0.273767 | 0.273767 | 0.273767 | 0.0 | 0.188882 | 0.188882 | 0.188882 | 0.188882 | 0.0 | 0.149537 | 0.149537 | 0.149537 | 0.149537 | 0.0 | 0.305148 | 0.305148 | 0.305148 | 0.305148 | 0.0 | 0.205937 | 0.205937 | 0.205937 | 0.205937 | 0.0 | 0.074863 | 0.074863 | 0.074863 | 0.074863 | 0.0 | 0.071975 | 0.071975 | 0.071975 | 0.071975 | 0.0 | 0.115288 | 0.115288 | 0.115288 | 0.115288 | 0.0 | 0.150934 | 0.150934 | 0.150934 | 0.150934 | 0.0 | 0.123582 | 0.123582 | 0.123582 | 0.123582 | 0.0 | 0.252064 | 0.274102 | 0.246760 | 0.217113 | 0.242858 | 0.132635 | 0.257733 | 0.277952 | 0.252709 | 0.225554 | 0.249208 | 0.125994 | 0.281304 | 0.277802 | 0.272725 | 0.278239 | 0.216198 | 0.283453 | 0.271123 | 0.287580 | 0.296247 | 0.402675 | 0.276163 | 0.141316 | 0.364001 | 0.408677 | 0.366349 | 0.482097 | 0.319001 | 0.296147 | 0.324754 | 0.419103 | 0.270217 | 0.446600 | 0.317694 | 0.296772 |
min | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 |
25% | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.966510 | -0.966510 | -0.966510 | -0.966510 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.306122 | 0.306122 | 0.306122 | 0.306122 | -1.0 | -0.930644 | -0.930644 | -0.930644 | -0.930644 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.291405 | -0.291405 | -0.291405 | -0.291405 | -1.0 | -0.341463 | -0.341463 | -0.341463 | -0.341463 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | -0.894695 | -0.894695 | -0.894695 | -0.894695 | -1.0 | -0.832368 | -0.832368 | -0.832368 | -0.832368 | -1.0 | -0.827801 | -0.827801 | -0.827801 | -0.827801 | -1.0 | -0.896759 | -0.896759 | -0.896759 | -0.896759 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.982231 | -0.982231 | -0.982231 | -0.982231 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.604806 | -0.604806 | -0.604806 | -0.604806 | -1.0 | -0.629630 | -0.629630 | -0.629630 | -0.629630 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.142857 | -0.142857 | -0.142857 | -0.142857 | -1.0 | -0.996827 | -0.996827 | -0.996827 | -0.996827 | -1.0 | -0.993521 | -0.993521 | -0.993521 | -0.993521 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.898795 | -0.898795 | -0.898795 | -0.898795 | -1.0 | -0.978877 | -0.978877 | -0.978877 | -0.978877 | -1.0 | -0.262708 | -0.523077 | -0.420791 | -0.552542 | -0.102991 | 0.684211 | -0.283951 | -0.538462 | -0.433962 | -0.517241 | -0.107143 | 0.684211 | -0.195876 | -0.375000 | -0.452991 | -0.642857 | 0.186813 | 0.818182 | -0.418803 | -0.578378 | -0.477612 | -0.575758 | -0.188406 | 0.736842 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 |
50% | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.909413 | -0.909413 | -0.909413 | -0.909413 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.132075 | -0.132075 | -0.132075 | -0.132075 | -1.0 | -0.182927 | -0.182927 | -0.182927 | -0.182927 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.773658 | -0.773658 | -0.773658 | -0.773658 | -1.0 | -0.736515 | -0.736515 | -0.736515 | -0.736515 | -1.0 | -0.847139 | -0.847139 | -0.847139 | -0.847139 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.942911 | -0.942911 | -0.942911 | -0.942911 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.463284 | -0.463284 | -0.463284 | -0.463284 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.995428 | -0.995428 | -0.995428 | -0.995428 | -1.0 | -0.986662 | -0.986662 | -0.986662 | -0.986662 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.874699 | -0.874699 | -0.874699 | -0.874699 | -1.0 | -0.978029 | -0.978029 | -0.978029 | -0.978029 | -1.0 | -0.100172 | -0.374405 | -0.283019 | -0.502825 | 0.035714 | 0.736842 | -0.135802 | -0.384615 | -0.283019 | -0.517241 | 0.035714 | 0.736842 | -0.030928 | -0.250000 | -0.282051 | -0.500000 | 0.318681 | 0.878788 | -0.247863 | -0.459459 | -0.328358 | -0.454545 | -0.014493 | 0.842105 | -1.000000 | -0.987730 | -0.984733 | -1.000000 | -0.976190 | -0.979798 | -1.000000 | -0.984944 | -0.989822 | -1.000000 | -0.975924 | -0.980333 |
75% | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.958115 | -0.958115 | -0.958115 | -0.958115 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.886766 | -0.886766 | -0.886766 | -0.886766 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.956776 | -0.956776 | -0.956776 | -0.956776 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.002096 | -0.002096 | -0.002096 | -0.002096 | -1.0 | -0.024390 | -0.024390 | -0.024390 | -0.024390 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.702588 | -0.702588 | -0.702588 | -0.702588 | -1.0 | -0.614108 | -0.614108 | -0.614108 | -0.614108 | -1.0 | -0.780312 | -0.780312 | -0.780312 | -0.780312 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.815123 | -0.815123 | -0.815123 | -0.815123 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.228304 | -0.228304 | -0.228304 | -0.228304 | -1.0 | -0.444444 | -0.444444 | -0.444444 | -0.444444 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.066667 | 0.066667 | 0.066667 | 0.066667 | -1.0 | -0.994961 | -0.994961 | -0.994961 | -0.994961 | -1.0 | -0.984756 | -0.984756 | -0.984756 | -0.984756 | -1.0 | -0.836512 | -0.836512 | -0.836512 | -0.836512 | -1.0 | -0.812048 | -0.812048 | -0.812048 | -0.812048 | -1.0 | -0.968315 | -0.968315 | -0.968315 | -0.968315 | -1.0 | 0.086420 | -0.184615 | -0.132075 | -0.383289 | 0.205890 | 0.823995 | 0.086420 | -0.200000 | -0.132075 | -0.379310 | 0.196429 | 0.842105 | 0.175258 | -0.050000 | -0.094017 | -0.357143 | 0.472527 | 0.919192 | -0.076923 | -0.243243 | -0.119403 | -0.212121 | 0.217391 | 0.894737 | -0.565217 | -0.558282 | -0.541985 | -0.647059 | -0.595238 | -0.878788 | -0.645482 | -0.522176 | -0.662529 | -0.634409 | -0.594677 | -0.880155 |
max | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 |
# Heatmap of correlation between all features
corrs = data[variable].corr()
plt.figure(figsize = (10, 6))
sns.heatmap(corrs, cmap = plt.cm.RdYlBu_r, vmin = -0.25, annot = False, vmax = 0.8)
plt.title('Clustermap');
Because there is a lot o features it's hard to take important information from the graph above.
Lets check the correlation between the features and the ICU column:
data_target_corr = abs(data.corr()['ICU'])
data_target_corr[data_target_corr < 1].sort_values(ascending = False)
RESPIRATORY_RATE_MAX 0.588523 RESPIRATORY_RATE_DIFF 0.502663 RESPIRATORY_RATE_DIFF_REL 0.489765 LACTATE_MIN 0.482143 LACTATE_MEAN 0.482143 LACTATE_MEDIAN 0.482143 LACTATE_MAX 0.482143 RESPIRATORY_RATE_MEAN 0.428144 BLOODPRESSURE_SISTOLIC_DIFF 0.413082 BLOODPRESSURE_DIASTOLIC_MIN 0.405757 BLOODPRESSURE_SISTOLIC_DIFF_REL 0.403476 RESPIRATORY_RATE_MEDIAN 0.387823 BLOODPRESSURE_SISTOLIC_MAX 0.379264 BLOODPRESSURE_DIASTOLIC_DIFF_REL 0.376300 BLOODPRESSURE_DIASTOLIC_DIFF 0.361708 HEART_RATE_DIFF 0.335091 HEART_RATE_DIFF_REL 0.333011 TEMPERATURE_DIFF_REL 0.331295 TEMPERATURE_DIFF 0.330577 BE_VENOUS_MIN 0.315695 BE_VENOUS_MEAN 0.315695 BE_VENOUS_MEDIAN 0.315695 BE_VENOUS_MAX 0.315695 HEMOGLOBIN_MAX 0.299909 HEMOGLOBIN_MIN 0.299909 HEMOGLOBIN_MEAN 0.299909 HEMOGLOBIN_MEDIAN 0.299909 BE_ARTERIAL_MEAN 0.298721 BE_ARTERIAL_MIN 0.298721 BE_ARTERIAL_MAX 0.298721 BE_ARTERIAL_MEDIAN 0.298721 TEMPERATURE_MIN 0.289717 LEUKOCYTES_MIN 0.287159 LEUKOCYTES_MAX 0.287159 LEUKOCYTES_MEAN 0.287159 LEUKOCYTES_MEDIAN 0.287159 HEMATOCRITE_MAX 0.283485 HEMATOCRITE_MEAN 0.283485 HEMATOCRITE_MIN 0.283485 HEMATOCRITE_MEDIAN 0.283485 ALBUMIN_MEDIAN 0.282270 ALBUMIN_MIN 0.282270 ALBUMIN_MAX 0.282270 ALBUMIN_MEAN 0.282270 UREA_MEAN 0.275264 UREA_MEDIAN 0.275264 UREA_MIN 0.275264 UREA_MAX 0.275264 NEUTROPHILES_MEDIAN 0.266037 NEUTROPHILES_MIN 0.266037 NEUTROPHILES_MEAN 0.266037 NEUTROPHILES_MAX 0.266037 OXYGEN_SATURATION_DIFF_REL 0.260411 OXYGEN_SATURATION_DIFF 0.259460 BLOODPRESSURE_DIASTOLIC_MEDIAN 0.249502 BLOODPRESSURE_DIASTOLIC_MEAN 0.245203 HEART_RATE_MAX 0.242518 OXYGEN_SATURATION_MAX 0.239048 OXYGEN_SATURATION_MIN 0.225335 AGE_ABOVE65 0.212198 HEART_RATE_MIN 0.202273 PLATELETS_MAX 0.197112 PLATELETS_MEDIAN 0.197112 PLATELETS_MEAN 0.197112 PLATELETS_MIN 0.197112 POTASSIUM_MAX 0.195682 POTASSIUM_MEAN 0.195682 POTASSIUM_MIN 0.195682 POTASSIUM_MEDIAN 0.195682 P02_VENOUS_MIN 0.176970 P02_VENOUS_MEDIAN 0.176970 P02_VENOUS_MEAN 0.176970 P02_VENOUS_MAX 0.176970 TTPA_MEDIAN 0.171142 TTPA_MEAN 0.171142 TTPA_MIN 0.171142 TTPA_MAX 0.171142 HTN 0.170247 TEMPERATURE_MAX 0.165743 BLOODPRESSURE_SISTOLIC_MIN 0.165125 SAT02_ARTERIAL_MEDIAN 0.162396 SAT02_ARTERIAL_MEAN 0.162396 SAT02_ARTERIAL_MAX 0.162396 SAT02_ARTERIAL_MIN 0.162396 BLOODPRESSURE_SISTOLIC_MEAN 0.146749 BLOODPRESSURE_SISTOLIC_MEDIAN 0.135832 BLOODPRESSURE_DIASTOLIC_MAX 0.128287 TEMPERATURE_MEAN 0.108314 CREATININ_MEDIAN 0.108089 CREATININ_MEAN 0.108089 CREATININ_MIN 0.108089 CREATININ_MAX 0.108089 INR_MAX 0.106773 INR_MEAN 0.106773 INR_MEDIAN 0.106773 INR_MIN 0.106773 PC02_VENOUS_MAX 0.106348 PC02_VENOUS_MIN 0.106348 PC02_VENOUS_MEAN 0.106348 PC02_VENOUS_MEDIAN 0.106348 BIC_ARTERIAL_MAX 0.103378 BIC_ARTERIAL_MEAN 0.103378 BIC_ARTERIAL_MIN 0.103378 BIC_ARTERIAL_MEDIAN 0.103378 TEMPERATURE_MEDIAN 0.101702 GGT_MEAN 0.101244 GGT_MAX 0.101244 GGT_MIN 0.101244 GGT_MEDIAN 0.101244 PH_VENOUS_MEDIAN 0.099049 PH_VENOUS_MEAN 0.099049 PH_VENOUS_MIN 0.099049 PH_VENOUS_MAX 0.099049 SAT02_VENOUS_MAX 0.095258 SAT02_VENOUS_MEDIAN 0.095258 SAT02_VENOUS_MIN 0.095258 SAT02_VENOUS_MEAN 0.095258 BIC_VENOUS_MEAN 0.090312 BIC_VENOUS_MEDIAN 0.090312 BIC_VENOUS_MIN 0.090312 BIC_VENOUS_MAX 0.090312 DISEASE GROUPING 5 0.087988 CALCIUM_MAX 0.086723 CALCIUM_MEDIAN 0.086723 CALCIUM_MIN 0.086723 CALCIUM_MEAN 0.086723 DISEASE GROUPING 2 0.081883 DISEASE GROUPING 3 0.077422 FFA_MAX 0.075599 FFA_MIN 0.075599 FFA_MEAN 0.075599 FFA_MEDIAN 0.075599 GENDER 0.065543 TGP_MEAN 0.065371 TGP_MIN 0.065371 TGP_MAX 0.065371 TGP_MEDIAN 0.065371 LINFOCITOS_MAX 0.063170 LINFOCITOS_MIN 0.063170 LINFOCITOS_MEDIAN 0.063170 LINFOCITOS_MEAN 0.063170 SODIUM_MEAN 0.062541 SODIUM_MEDIAN 0.062541 SODIUM_MIN 0.062541 SODIUM_MAX 0.062541 DISEASE GROUPING 1 0.061308 DISEASE GROUPING 4 0.057456 RESPIRATORY_RATE_MIN 0.053762 TGO_MIN 0.052805 TGO_MEDIAN 0.052805 TGO_MEAN 0.052805 TGO_MAX 0.052805 PC02_ARTERIAL_MAX 0.048973 PC02_ARTERIAL_MIN 0.048973 PC02_ARTERIAL_MEAN 0.048973 PC02_ARTERIAL_MEDIAN 0.048973 OTHER 0.048225 PATIENT_VISIT_IDENTIFIER 0.047547 DIMER_MEDIAN 0.030495 DIMER_MAX 0.030495 DIMER_MEAN 0.030495 DIMER_MIN 0.030495 BILLIRUBIN_MEDIAN 0.028567 BILLIRUBIN_MEAN 0.028567 BILLIRUBIN_MAX 0.028567 BILLIRUBIN_MIN 0.028567 P02_ARTERIAL_MEAN 0.027632 P02_ARTERIAL_MIN 0.027632 P02_ARTERIAL_MEDIAN 0.027632 P02_ARTERIAL_MAX 0.027632 PH_ARTERIAL_MAX 0.026004 PH_ARTERIAL_MIN 0.026004 PH_ARTERIAL_MEAN 0.026004 PH_ARTERIAL_MEDIAN 0.026004 PCR_MAX 0.025703 PCR_MIN 0.025703 PCR_MEAN 0.025703 PCR_MEDIAN 0.025703 OXYGEN_SATURATION_MEDIAN 0.019525 BLAST_MIN 0.018549 BLAST_MAX 0.018549 BLAST_MEDIAN 0.018549 BLAST_MEAN 0.018549 HEART_RATE_MEDIAN 0.016677 IMMUNOCOMPROMISED 0.014357 GLUCOSE_MIN 0.011992 GLUCOSE_MEAN 0.011992 GLUCOSE_MEDIAN 0.011992 GLUCOSE_MAX 0.011992 DISEASE GROUPING 6 0.006344 OXYGEN_SATURATION_MEAN 0.005636 HEART_RATE_MEAN 0.001294 Name: ICU, dtype: float64
# Make a copy of the data
data_copy = data.copy()
# create column to identify if patient ever went to ICU
clean_data = (data.groupby("PATIENT_VISIT_IDENTIFIER")["ICU"].sum()>0).reset_index()*1
clean_data.columns = ["PATIENT_VISIT_IDENTIFIER", "ICU_SUM"]
clean_data = pd.merge(data, clean_data, on = "PATIENT_VISIT_IDENTIFIER")
clean_data.head()
PATIENT_VISIT_IDENTIFIER | AGE_ABOVE65 | AGE_PERCENTIL | GENDER | DISEASE GROUPING 1 | DISEASE GROUPING 2 | DISEASE GROUPING 3 | DISEASE GROUPING 4 | DISEASE GROUPING 5 | DISEASE GROUPING 6 | HTN | IMMUNOCOMPROMISED | OTHER | ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | WINDOW | ICU | ICU_SUM | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.086420 | -0.230769 | -0.283019 | -0.593220 | -0.285714 | 0.736842 | 0.086420 | -0.230769 | -0.283019 | -0.586207 | -0.285714 | 0.736842 | 0.237113 | 0.0000 | -0.162393 | -0.500000 | 0.208791 | 0.898990 | -0.247863 | -0.459459 | -0.432836 | -0.636364 | -0.420290 | 0.736842 | -1.00000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 0-2 | 0 | 1 |
1 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 0.333333 | -0.230769 | -0.132075 | -0.593220 | 0.535714 | 0.578947 | 0.333333 | -0.230769 | -0.132075 | -0.586207 | 0.535714 | 0.578947 | 0.443299 | 0.0000 | -0.025641 | -0.500000 | 0.714286 | 0.838384 | -0.076923 | -0.459459 | -0.313433 | -0.636364 | 0.246377 | 0.578947 | -1.00000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 2-4 | 0 | 1 |
2 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.183673 | 0.183673 | 0.183673 | 0.183673 | -1.0 | -0.868365 | -0.868365 | -0.868365 | -0.868365 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.945093 | -0.945093 | -0.945093 | -0.945093 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.090147 | 0.090147 | 0.090147 | 0.090147 | -1.0 | 0.109756 | 0.109756 | 0.109756 | 0.109756 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.835844 | -0.835844 | -0.835844 | -0.835844 | -1.0 | -0.914938 | -0.914938 | -0.914938 | -0.914938 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.875236 | -0.875236 | -0.875236 | -0.875236 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.540721 | -0.540721 | -0.540721 | -0.540721 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.997201 | -0.997201 | -0.997201 | -0.997201 | -1.0 | -0.990854 | -0.990854 | -0.990854 | -0.990854 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.994912 | -0.994912 | -0.994912 | -0.994912 | -1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 4-6 | 0 | 1 |
3 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | -0.107143 | 0.736842 | NaN | NaN | NaN | NaN | -0.107143 | 0.736842 | NaN | NaN | NaN | NaN | 0.318681 | 0.898990 | NaN | NaN | NaN | NaN | -0.275362 | 0.736842 | NaN | NaN | NaN | NaN | -1.000000 | -1.000000 | NaN | NaN | NaN | NaN | -1.000000 | -1.000000 | 6-12 | 0 | 1 |
4 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | -1.0 | -0.871658 | -0.871658 | -0.871658 | -0.871658 | -1.0 | -0.863874 | -0.863874 | -0.863874 | -0.863874 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.414634 | -0.414634 | -0.414634 | -0.414634 | -1.0 | -0.979069 | -0.979069 | -0.979069 | -0.979069 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.326531 | 0.326531 | 0.326531 | 0.326531 | -1.0 | -0.926398 | -0.926398 | -0.926398 | -0.926398 | -1.0 | -0.859275 | -0.859275 | -0.859275 | -0.859275 | -1.0 | -0.669393 | -0.669393 | -0.669393 | -0.669393 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.320755 | -0.320755 | -0.320755 | -0.320755 | -1.0 | -0.353659 | -0.353659 | -0.353659 | -0.353659 | -1.0 | -0.979925 | -0.979925 | -0.979925 | -0.979925 | -1.0 | -0.963023 | -0.963023 | -0.963023 | -0.963023 | -1.0 | -0.762843 | -0.762843 | -0.762843 | -0.762843 | -1.0 | -0.643154 | -0.643154 | -0.643154 | -0.643154 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.365854 | -0.365854 | -0.365854 | -0.365854 | -1.0 | -0.230769 | -0.230769 | -0.230769 | -0.230769 | -1.0 | -0.875862 | -0.875862 | -0.875862 | -0.875862 | -1.0 | -0.815951 | -0.815951 | -0.815951 | -0.815951 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.574468 | 0.574468 | 0.574468 | 0.574468 | -1.0 | 0.393939 | 0.393939 | 0.393939 | 0.393939 | -1.0 | -0.471295 | -0.471295 | -0.471295 | -0.471295 | -1.0 | -0.666667 | -0.666667 | -0.666667 | -0.666667 | -1.0 | 0.848485 | 0.848485 | 0.848485 | 0.848485 | -1.0 | 0.925926 | 0.925926 | 0.925926 | 0.925926 | -1.0 | 0.142857 | 0.142857 | 0.142857 | 0.142857 | -1.0 | -0.999067 | -0.999067 | -0.999067 | -0.999067 | -1.0 | -0.983994 | -0.983994 | -0.983994 | -0.983994 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.996762 | -0.996762 | -0.996762 | -0.996762 | -1.0 | -0.243021 | -0.338537 | -0.213031 | -0.317859 | 0.033779 | 0.665932 | -0.283951 | -0.376923 | -0.188679 | -0.379310 | 0.035714 | 0.631579 | -0.340206 | -0.4875 | -0.572650 | -0.857143 | 0.098901 | 0.797980 | -0.076923 | 0.286486 | 0.298507 | 0.272727 | 0.362319 | 0.947368 | -0.33913 | 0.325153 | 0.114504 | 0.176471 | -0.238095 | -0.818182 | -0.389967 | 0.407558 | -0.230462 | 0.096774 | -0.242282 | -0.814433 | ABOVE_12 | 1 | 1 |
As we observed before, in the missing values step there are 225 variables with missing values and in total, 223863 NaN values.
We will deal with this by inputing the values with the next and previous values, as sugested by the authors of the dataset.
clean_data=clean_data.fillna(method='ffill').fillna(method='bfill') # filling of NaNs
clean_data.head()
PATIENT_VISIT_IDENTIFIER | AGE_ABOVE65 | AGE_PERCENTIL | GENDER | DISEASE GROUPING 1 | DISEASE GROUPING 2 | DISEASE GROUPING 3 | DISEASE GROUPING 4 | DISEASE GROUPING 5 | DISEASE GROUPING 6 | HTN | IMMUNOCOMPROMISED | OTHER | ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | WINDOW | ICU | ICU_SUM | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.183673 | 0.183673 | 0.183673 | 0.183673 | -1.0 | -0.868365 | -0.868365 | -0.868365 | -0.868365 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.945093 | -0.945093 | -0.945093 | -0.945093 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.090147 | 0.090147 | 0.090147 | 0.090147 | -1.0 | 0.109756 | 0.109756 | 0.109756 | 0.109756 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.835844 | -0.835844 | -0.835844 | -0.835844 | -1.0 | -0.914938 | -0.914938 | -0.914938 | -0.914938 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.875236 | -0.875236 | -0.875236 | -0.875236 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.540721 | -0.540721 | -0.540721 | -0.540721 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.997201 | -0.997201 | -0.997201 | -0.997201 | -1.0 | -0.990854 | -0.990854 | -0.990854 | -0.990854 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.994912 | -0.994912 | -0.994912 | -0.994912 | -1.0 | 0.086420 | -0.230769 | -0.283019 | -0.593220 | -0.285714 | 0.736842 | 0.086420 | -0.230769 | -0.283019 | -0.586207 | -0.285714 | 0.736842 | 0.237113 | 0.0000 | -0.162393 | -0.500000 | 0.208791 | 0.898990 | -0.247863 | -0.459459 | -0.432836 | -0.636364 | -0.420290 | 0.736842 | -1.00000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 0-2 | 0 | 1 |
1 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.183673 | 0.183673 | 0.183673 | 0.183673 | -1.0 | -0.868365 | -0.868365 | -0.868365 | -0.868365 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.945093 | -0.945093 | -0.945093 | -0.945093 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.090147 | 0.090147 | 0.090147 | 0.090147 | -1.0 | 0.109756 | 0.109756 | 0.109756 | 0.109756 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.835844 | -0.835844 | -0.835844 | -0.835844 | -1.0 | -0.914938 | -0.914938 | -0.914938 | -0.914938 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.875236 | -0.875236 | -0.875236 | -0.875236 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.540721 | -0.540721 | -0.540721 | -0.540721 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.997201 | -0.997201 | -0.997201 | -0.997201 | -1.0 | -0.990854 | -0.990854 | -0.990854 | -0.990854 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.994912 | -0.994912 | -0.994912 | -0.994912 | -1.0 | 0.333333 | -0.230769 | -0.132075 | -0.593220 | 0.535714 | 0.578947 | 0.333333 | -0.230769 | -0.132075 | -0.586207 | 0.535714 | 0.578947 | 0.443299 | 0.0000 | -0.025641 | -0.500000 | 0.714286 | 0.838384 | -0.076923 | -0.459459 | -0.313433 | -0.636364 | 0.246377 | 0.578947 | -1.00000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 2-4 | 0 | 1 |
2 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.183673 | 0.183673 | 0.183673 | 0.183673 | -1.0 | -0.868365 | -0.868365 | -0.868365 | -0.868365 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.945093 | -0.945093 | -0.945093 | -0.945093 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.090147 | 0.090147 | 0.090147 | 0.090147 | -1.0 | 0.109756 | 0.109756 | 0.109756 | 0.109756 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.835844 | -0.835844 | -0.835844 | -0.835844 | -1.0 | -0.914938 | -0.914938 | -0.914938 | -0.914938 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.875236 | -0.875236 | -0.875236 | -0.875236 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.540721 | -0.540721 | -0.540721 | -0.540721 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.997201 | -0.997201 | -0.997201 | -0.997201 | -1.0 | -0.990854 | -0.990854 | -0.990854 | -0.990854 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.994912 | -0.994912 | -0.994912 | -0.994912 | -1.0 | 0.333333 | -0.230769 | -0.132075 | -0.593220 | 0.535714 | 0.578947 | 0.333333 | -0.230769 | -0.132075 | -0.586207 | 0.535714 | 0.578947 | 0.443299 | 0.0000 | -0.025641 | -0.500000 | 0.714286 | 0.838384 | -0.076923 | -0.459459 | -0.313433 | -0.636364 | 0.246377 | 0.578947 | -1.00000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 4-6 | 0 | 1 |
3 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.183673 | 0.183673 | 0.183673 | 0.183673 | -1.0 | -0.868365 | -0.868365 | -0.868365 | -0.868365 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.945093 | -0.945093 | -0.945093 | -0.945093 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.090147 | 0.090147 | 0.090147 | 0.090147 | -1.0 | 0.109756 | 0.109756 | 0.109756 | 0.109756 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.835844 | -0.835844 | -0.835844 | -0.835844 | -1.0 | -0.914938 | -0.914938 | -0.914938 | -0.914938 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.779310 | -0.779310 | -0.779310 | -0.779310 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.875236 | -0.875236 | -0.875236 | -0.875236 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.540721 | -0.540721 | -0.540721 | -0.540721 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.997201 | -0.997201 | -0.997201 | -0.997201 | -1.0 | -0.990854 | -0.990854 | -0.990854 | -0.990854 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.994912 | -0.994912 | -0.994912 | -0.994912 | -1.0 | 0.333333 | -0.230769 | -0.132075 | -0.593220 | -0.107143 | 0.736842 | 0.333333 | -0.230769 | -0.132075 | -0.586207 | -0.107143 | 0.736842 | 0.443299 | 0.0000 | -0.025641 | -0.500000 | 0.318681 | 0.898990 | -0.076923 | -0.459459 | -0.313433 | -0.636364 | -0.275362 | 0.736842 | -1.00000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 6-12 | 0 | 1 |
4 | 0 | 1 | 60th | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | -1.0 | -0.871658 | -0.871658 | -0.871658 | -0.871658 | -1.0 | -0.863874 | -0.863874 | -0.863874 | -0.863874 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.414634 | -0.414634 | -0.414634 | -0.414634 | -1.0 | -0.979069 | -0.979069 | -0.979069 | -0.979069 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.326531 | 0.326531 | 0.326531 | 0.326531 | -1.0 | -0.926398 | -0.926398 | -0.926398 | -0.926398 | -1.0 | -0.859275 | -0.859275 | -0.859275 | -0.859275 | -1.0 | -0.669393 | -0.669393 | -0.669393 | -0.669393 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | -0.320755 | -0.320755 | -0.320755 | -0.320755 | -1.0 | -0.353659 | -0.353659 | -0.353659 | -0.353659 | -1.0 | -0.979925 | -0.979925 | -0.979925 | -0.979925 | -1.0 | -0.963023 | -0.963023 | -0.963023 | -0.963023 | -1.0 | -0.762843 | -0.762843 | -0.762843 | -0.762843 | -1.0 | -0.643154 | -0.643154 | -0.643154 | -0.643154 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.365854 | -0.365854 | -0.365854 | -0.365854 | -1.0 | -0.230769 | -0.230769 | -0.230769 | -0.230769 | -1.0 | -0.875862 | -0.875862 | -0.875862 | -0.875862 | -1.0 | -0.815951 | -0.815951 | -0.815951 | -0.815951 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.574468 | 0.574468 | 0.574468 | 0.574468 | -1.0 | 0.393939 | 0.393939 | 0.393939 | 0.393939 | -1.0 | -0.471295 | -0.471295 | -0.471295 | -0.471295 | -1.0 | -0.666667 | -0.666667 | -0.666667 | -0.666667 | -1.0 | 0.848485 | 0.848485 | 0.848485 | 0.848485 | -1.0 | 0.925926 | 0.925926 | 0.925926 | 0.925926 | -1.0 | 0.142857 | 0.142857 | 0.142857 | 0.142857 | -1.0 | -0.999067 | -0.999067 | -0.999067 | -0.999067 | -1.0 | -0.983994 | -0.983994 | -0.983994 | -0.983994 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.996762 | -0.996762 | -0.996762 | -0.996762 | -1.0 | -0.243021 | -0.338537 | -0.213031 | -0.317859 | 0.033779 | 0.665932 | -0.283951 | -0.376923 | -0.188679 | -0.379310 | 0.035714 | 0.631579 | -0.340206 | -0.4875 | -0.572650 | -0.857143 | 0.098901 | 0.797980 | -0.076923 | 0.286486 | 0.298507 | 0.272727 | 0.362319 | 0.947368 | -0.33913 | 0.325153 | 0.114504 | 0.176471 | -0.238095 | -0.818182 | -0.389967 | 0.407558 | -0.230462 | 0.096774 | -0.242282 | -0.814433 | ABOVE_12 | 1 | 1 |
#Rows with ICU = 1 will be dropped because they are not usefull for our model as stipulated by the author
final_data= clean_data[clean_data.ICU == 0].reset_index(drop= True)
#We will use window 0-2 data on our model to predict as soon as possible if the patient will have to be admitted to the ICU, as recomended by the authors
final_data = final_data[final_data.WINDOW == "0-2"].reset_index(drop = True)
#drop patient ID, window and ICU columns
final= final_data.drop(["PATIENT_VISIT_IDENTIFIER", "WINDOW", "ICU"],axis = 1)
# Feature Encoding
le = LabelEncoder()
final['AGE_PERCENTIL'] = le.fit_transform(final['AGE_PERCENTIL'])
final.duplicated().sum()
0
data.shape
(1925, 231)
final.shape
(353, 229)
1572 rows and 2 columns have been droped
final.head()
AGE_ABOVE65 | AGE_PERCENTIL | GENDER | DISEASE GROUPING 1 | DISEASE GROUPING 2 | DISEASE GROUPING 3 | DISEASE GROUPING 4 | DISEASE GROUPING 5 | DISEASE GROUPING 6 | HTN | IMMUNOCOMPROMISED | OTHER | ALBUMIN_MEDIAN | ALBUMIN_MEAN | ALBUMIN_MIN | ALBUMIN_MAX | ALBUMIN_DIFF | BE_ARTERIAL_MEDIAN | BE_ARTERIAL_MEAN | BE_ARTERIAL_MIN | BE_ARTERIAL_MAX | BE_ARTERIAL_DIFF | BE_VENOUS_MEDIAN | BE_VENOUS_MEAN | BE_VENOUS_MIN | BE_VENOUS_MAX | BE_VENOUS_DIFF | BIC_ARTERIAL_MEDIAN | BIC_ARTERIAL_MEAN | BIC_ARTERIAL_MIN | BIC_ARTERIAL_MAX | BIC_ARTERIAL_DIFF | BIC_VENOUS_MEDIAN | BIC_VENOUS_MEAN | BIC_VENOUS_MIN | BIC_VENOUS_MAX | BIC_VENOUS_DIFF | BILLIRUBIN_MEDIAN | BILLIRUBIN_MEAN | BILLIRUBIN_MIN | BILLIRUBIN_MAX | BILLIRUBIN_DIFF | BLAST_MEDIAN | BLAST_MEAN | BLAST_MIN | BLAST_MAX | BLAST_DIFF | CALCIUM_MEDIAN | CALCIUM_MEAN | CALCIUM_MIN | CALCIUM_MAX | CALCIUM_DIFF | CREATININ_MEDIAN | CREATININ_MEAN | CREATININ_MIN | CREATININ_MAX | CREATININ_DIFF | FFA_MEDIAN | FFA_MEAN | FFA_MIN | FFA_MAX | FFA_DIFF | GGT_MEDIAN | GGT_MEAN | GGT_MIN | GGT_MAX | GGT_DIFF | GLUCOSE_MEDIAN | GLUCOSE_MEAN | GLUCOSE_MIN | GLUCOSE_MAX | GLUCOSE_DIFF | HEMATOCRITE_MEDIAN | HEMATOCRITE_MEAN | HEMATOCRITE_MIN | HEMATOCRITE_MAX | HEMATOCRITE_DIFF | HEMOGLOBIN_MEDIAN | HEMOGLOBIN_MEAN | HEMOGLOBIN_MIN | HEMOGLOBIN_MAX | HEMOGLOBIN_DIFF | INR_MEDIAN | INR_MEAN | INR_MIN | INR_MAX | INR_DIFF | LACTATE_MEDIAN | LACTATE_MEAN | LACTATE_MIN | LACTATE_MAX | LACTATE_DIFF | LEUKOCYTES_MEDIAN | LEUKOCYTES_MEAN | LEUKOCYTES_MIN | LEUKOCYTES_MAX | LEUKOCYTES_DIFF | LINFOCITOS_MEDIAN | LINFOCITOS_MEAN | LINFOCITOS_MIN | LINFOCITOS_MAX | LINFOCITOS_DIFF | NEUTROPHILES_MEDIAN | NEUTROPHILES_MEAN | NEUTROPHILES_MIN | NEUTROPHILES_MAX | NEUTROPHILES_DIFF | P02_ARTERIAL_MEDIAN | P02_ARTERIAL_MEAN | P02_ARTERIAL_MIN | P02_ARTERIAL_MAX | P02_ARTERIAL_DIFF | P02_VENOUS_MEDIAN | P02_VENOUS_MEAN | P02_VENOUS_MIN | P02_VENOUS_MAX | P02_VENOUS_DIFF | PC02_ARTERIAL_MEDIAN | PC02_ARTERIAL_MEAN | PC02_ARTERIAL_MIN | PC02_ARTERIAL_MAX | PC02_ARTERIAL_DIFF | PC02_VENOUS_MEDIAN | PC02_VENOUS_MEAN | PC02_VENOUS_MIN | PC02_VENOUS_MAX | PC02_VENOUS_DIFF | PCR_MEDIAN | PCR_MEAN | PCR_MIN | PCR_MAX | PCR_DIFF | PH_ARTERIAL_MEDIAN | PH_ARTERIAL_MEAN | PH_ARTERIAL_MIN | PH_ARTERIAL_MAX | PH_ARTERIAL_DIFF | PH_VENOUS_MEDIAN | PH_VENOUS_MEAN | PH_VENOUS_MIN | PH_VENOUS_MAX | PH_VENOUS_DIFF | PLATELETS_MEDIAN | PLATELETS_MEAN | PLATELETS_MIN | PLATELETS_MAX | PLATELETS_DIFF | POTASSIUM_MEDIAN | POTASSIUM_MEAN | POTASSIUM_MIN | POTASSIUM_MAX | POTASSIUM_DIFF | SAT02_ARTERIAL_MEDIAN | SAT02_ARTERIAL_MEAN | SAT02_ARTERIAL_MIN | SAT02_ARTERIAL_MAX | SAT02_ARTERIAL_DIFF | SAT02_VENOUS_MEDIAN | SAT02_VENOUS_MEAN | SAT02_VENOUS_MIN | SAT02_VENOUS_MAX | SAT02_VENOUS_DIFF | SODIUM_MEDIAN | SODIUM_MEAN | SODIUM_MIN | SODIUM_MAX | SODIUM_DIFF | TGO_MEDIAN | TGO_MEAN | TGO_MIN | TGO_MAX | TGO_DIFF | TGP_MEDIAN | TGP_MEAN | TGP_MIN | TGP_MAX | TGP_DIFF | TTPA_MEDIAN | TTPA_MEAN | TTPA_MIN | TTPA_MAX | TTPA_DIFF | UREA_MEDIAN | UREA_MEAN | UREA_MIN | UREA_MAX | UREA_DIFF | DIMER_MEDIAN | DIMER_MEAN | DIMER_MIN | DIMER_MAX | DIMER_DIFF | BLOODPRESSURE_DIASTOLIC_MEAN | BLOODPRESSURE_SISTOLIC_MEAN | HEART_RATE_MEAN | RESPIRATORY_RATE_MEAN | TEMPERATURE_MEAN | OXYGEN_SATURATION_MEAN | BLOODPRESSURE_DIASTOLIC_MEDIAN | BLOODPRESSURE_SISTOLIC_MEDIAN | HEART_RATE_MEDIAN | RESPIRATORY_RATE_MEDIAN | TEMPERATURE_MEDIAN | OXYGEN_SATURATION_MEDIAN | BLOODPRESSURE_DIASTOLIC_MIN | BLOODPRESSURE_SISTOLIC_MIN | HEART_RATE_MIN | RESPIRATORY_RATE_MIN | TEMPERATURE_MIN | OXYGEN_SATURATION_MIN | BLOODPRESSURE_DIASTOLIC_MAX | BLOODPRESSURE_SISTOLIC_MAX | HEART_RATE_MAX | RESPIRATORY_RATE_MAX | TEMPERATURE_MAX | OXYGEN_SATURATION_MAX | BLOODPRESSURE_DIASTOLIC_DIFF | BLOODPRESSURE_SISTOLIC_DIFF | HEART_RATE_DIFF | RESPIRATORY_RATE_DIFF | TEMPERATURE_DIFF | OXYGEN_SATURATION_DIFF | BLOODPRESSURE_DIASTOLIC_DIFF_REL | BLOODPRESSURE_SISTOLIC_DIFF_REL | HEART_RATE_DIFF_REL | RESPIRATORY_RATE_DIFF_REL | TEMPERATURE_DIFF_REL | OXYGEN_SATURATION_DIFF_REL | ICU_SUM | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 5 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.183673 | 0.183673 | 0.183673 | 0.183673 | -1.0 | -0.868365 | -0.868365 | -0.868365 | -0.868365 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.945093 | -0.945093 | -0.945093 | -0.945093 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.090147 | 0.090147 | 0.090147 | 0.090147 | -1.0 | 0.109756 | 0.109756 | 0.109756 | 0.109756 | -1.0 | -0.932246 | -0.932246 | -0.932246 | -0.932246 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.835844 | -0.835844 | -0.835844 | -0.835844 | -1.0 | -0.914938 | -0.914938 | -0.914938 | -0.914938 | -1.0 | -0.868747 | -0.868747 | -0.868747 | -0.868747 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.77931 | -0.77931 | -0.77931 | -0.77931 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.875236 | -0.875236 | -0.875236 | -0.875236 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.540721 | -0.540721 | -0.540721 | -0.540721 | -1.0 | -0.518519 | -0.518519 | -0.518519 | -0.518519 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | -0.028571 | -0.028571 | -0.028571 | -0.028571 | -1.0 | -0.997201 | -0.997201 | -0.997201 | -0.997201 | -1.0 | -0.990854 | -0.990854 | -0.990854 | -0.990854 | -1.0 | -0.825613 | -0.825613 | -0.825613 | -0.825613 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.994912 | -0.994912 | -0.994912 | -0.994912 | -1.0 | 0.086420 | -0.230769 | -0.283019 | -0.593220 | -0.285714 | 0.736842 | 0.086420 | -0.230769 | -0.283019 | -0.586207 | -0.285714 | 0.736842 | 0.237113 | 0.000 | -0.162393 | -0.500000 | 0.208791 | 0.898990 | -0.247863 | -0.459459 | -0.432836 | -0.636364 | -0.420290 | 0.736842 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | 1 |
1 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.912243 | -0.912243 | -0.912243 | -0.912243 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.780261 | -0.780261 | -0.780261 | -0.780261 | -1.0 | 0.144654 | 0.144654 | 0.144654 | 0.144654 | -1.0 | 0.158537 | 0.158537 | 0.158537 | 0.158537 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.382773 | -0.382773 | -0.382773 | -0.382773 | -1.0 | -0.908714 | -0.908714 | -0.908714 | -0.908714 | -1.0 | -0.412965 | -0.412965 | -0.412965 | -0.412965 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.77931 | -0.77931 | -0.77931 | -0.77931 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.939887 | -0.939887 | -0.939887 | -0.939887 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.399199 | -0.399199 | -0.399199 | -0.399199 | -1.0 | -0.703704 | -0.703704 | -0.703704 | -0.703704 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.085714 | 0.085714 | 0.085714 | 0.085714 | -1.0 | -0.995428 | -0.995428 | -0.995428 | -0.995428 | -1.0 | -0.986662 | -0.986662 | -0.986662 | -0.986662 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.836145 | -0.836145 | -0.836145 | -0.836145 | -1.0 | -0.978029 | -0.978029 | -0.978029 | -0.978029 | -1.0 | -0.178122 | 0.212601 | -0.141163 | -0.380216 | 0.010915 | 0.841977 | -0.185185 | 0.184615 | -0.169811 | -0.379310 | 0.000000 | 0.842105 | -0.587629 | -0.325 | -0.572650 | -1.000000 | 0.010989 | 0.797980 | 0.555556 | 0.556757 | 0.298507 | 0.757576 | 0.710145 | 1.000000 | 0.513043 | 0.472393 | 0.114504 | 0.764706 | 0.142857 | -0.797980 | 0.315690 | 0.200359 | -0.239515 | 0.645161 | 0.139709 | -0.802317 | 1 |
2 | 0 | 3 | 1 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.463415 | -0.463415 | -0.463415 | -0.463415 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.367347 | 0.367347 | 0.367347 | 0.367347 | -1.0 | -0.906582 | -0.906582 | -0.906582 | -0.906582 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.018868 | 0.018868 | 0.018868 | 0.018868 | -1.0 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | -0.948553 | -0.948553 | -0.948553 | -0.948553 | -1.0 | -0.628814 | -0.628814 | -0.628814 | -0.628814 | -1.0 | -0.730290 | -0.730290 | -0.730290 | -0.730290 | -1.0 | -0.723890 | -0.723890 | -0.723890 | -0.723890 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.479290 | -0.479290 | -0.479290 | -0.479290 | -1.0 | -0.77931 | -0.77931 | -0.77931 | -0.77931 | -1.0 | -0.852761 | -0.852761 | -0.852761 | -0.852761 | -1.0 | -0.586767 | -0.586767 | -0.586767 | -0.586767 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.424242 | 0.424242 | 0.424242 | 0.424242 | -1.0 | -0.228304 | -0.228304 | -0.228304 | -0.228304 | -1.0 | -0.592593 | -0.592593 | -0.592593 | -0.592593 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.777778 | 0.777778 | 0.777778 | 0.777778 | -1.0 | -0.142857 | -0.142857 | -0.142857 | -0.142857 | -1.0 | -0.995428 | -0.995428 | -0.995428 | -0.995428 | -1.0 | -0.986662 | -0.986662 | -0.986662 | -0.986662 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.927711 | -0.927711 | -0.927711 | -0.927711 | -1.0 | -0.978029 | -0.978029 | -0.978029 | -0.978029 | -1.0 | -0.181070 | -0.551603 | -0.280660 | -0.543785 | 0.057292 | 0.797149 | -0.160494 | -0.538462 | -0.273585 | -0.517241 | 0.107143 | 0.789474 | -0.298969 | -0.450 | -0.487179 | -0.642857 | 0.142857 | 0.878788 | -0.247863 | -0.351351 | -0.149254 | -0.454545 | 0.101449 | 0.947368 | -0.547826 | -0.435583 | -0.419847 | -0.705882 | -0.500000 | -0.898990 | -0.612422 | -0.343258 | -0.576744 | -0.695341 | -0.505464 | -0.900129 | 0 |
3 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.935113 | -0.935113 | -0.935113 | -0.935113 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.913659 | -0.913659 | -0.913659 | -0.913659 | -1.0 | -0.829424 | -0.829424 | -0.829424 | -0.829424 | -1.0 | -0.938084 | -0.938084 | -0.938084 | -0.938084 | -1.0 | -0.851024 | -0.851024 | -0.851024 | -0.851024 | -1.0 | 0.358491 | 0.358491 | 0.358491 | 0.358491 | -1.0 | 0.304878 | 0.304878 | 0.304878 | 0.304878 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.702202 | -0.702202 | -0.702202 | -0.702202 | -1.0 | -0.641079 | -0.641079 | -0.641079 | -0.641079 | -1.0 | -0.812725 | -0.812725 | -0.812725 | -0.812725 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.77931 | -0.77931 | -0.77931 | -0.77931 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.990926 | -0.990926 | -0.990926 | -0.990926 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.457944 | -0.457944 | -0.457944 | -0.457944 | -1.0 | -0.592593 | -0.592593 | -0.592593 | -0.592593 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.142857 | 0.142857 | 0.142857 | 0.142857 | -1.0 | -0.998507 | -0.998507 | -0.998507 | -0.998507 | -1.0 | -0.991235 | -0.991235 | -0.991235 | -0.991235 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.903614 | -0.903614 | -0.903614 | -0.903614 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | -0.002798 | -0.546256 | -0.270189 | -0.535593 | 0.033571 | 0.694035 | 0.086420 | -0.538462 | -0.301887 | -0.517241 | -0.035714 | 0.736842 | -0.381443 | -0.625 | -0.521368 | -0.857143 | 0.120879 | 0.171717 | 0.145299 | -0.286486 | 0.477612 | -0.272727 | 0.623188 | 1.000000 | -0.078261 | -0.190184 | 0.251908 | -0.352941 | -0.047619 | -0.171717 | -0.308696 | -0.057718 | -0.069094 | -0.329749 | -0.047619 | -0.172436 | 0 |
4 | 0 | 0 | 0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.605263 | 0.605263 | 0.605263 | 0.605263 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.317073 | -0.317073 | -0.317073 | -0.317073 | -1.0 | -0.938950 | -0.938950 | -0.938950 | -0.938950 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | -1.0 | 0.357143 | 0.357143 | 0.357143 | 0.357143 | -1.0 | -0.891012 | -0.891012 | -0.891012 | -0.891012 | -1.0 | -0.742004 | -0.742004 | -0.742004 | -0.742004 | -1.0 | -0.958528 | -0.958528 | -0.958528 | -0.958528 | -1.0 | -0.891993 | -0.891993 | -0.891993 | -0.891993 | -1.0 | 0.291405 | 0.291405 | 0.291405 | 0.291405 | -1.0 | 0.243902 | 0.243902 | 0.243902 | 0.243902 | -1.0 | -0.959849 | -0.959849 | -0.959849 | -0.959849 | -1.0 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | -1.0 | -0.706450 | -0.706450 | -0.706450 | -0.706450 | -1.0 | -0.340249 | -0.340249 | -0.340249 | -0.340249 | -1.0 | -0.846339 | -0.846339 | -0.846339 | -0.846339 | -1.0 | -0.170732 | -0.170732 | -0.170732 | -0.170732 | -1.0 | -0.704142 | -0.704142 | -0.704142 | -0.704142 | -1.0 | -0.77931 | -0.77931 | -0.77931 | -0.77931 | -1.0 | -0.754601 | -0.754601 | -0.754601 | -0.754601 | -1.0 | -0.997732 | -0.997732 | -0.997732 | -0.997732 | -1.0 | 0.234043 | 0.234043 | 0.234043 | 0.234043 | -1.0 | 0.363636 | 0.363636 | 0.363636 | 0.363636 | -1.0 | -0.292390 | -0.292390 | -0.292390 | -0.292390 | -1.0 | -0.666667 | -0.666667 | -0.666667 | -0.666667 | -1.0 | 0.939394 | 0.939394 | 0.939394 | 0.939394 | -1.0 | 0.345679 | 0.345679 | 0.345679 | 0.345679 | -1.0 | 0.085714 | 0.085714 | 0.085714 | 0.085714 | -1.0 | -0.997947 | -0.997947 | -0.997947 | -0.997947 | -1.0 | -0.988948 | -0.988948 | -0.988948 | -0.988948 | -1.0 | -0.846633 | -0.846633 | -0.846633 | -0.846633 | -1.0 | -0.884337 | -0.884337 | -0.884337 | -0.884337 | -1.0 | -1.000000 | -1.000000 | -1.000000 | -1.000000 | -1.0 | 0.290762 | -0.074271 | 0.051399 | -0.499708 | 0.040640 | 0.820327 | 0.333333 | -0.076923 | 0.056604 | -0.517241 | 0.071429 | 0.789474 | 0.030928 | -0.125 | -0.230769 | -0.500000 | 0.208791 | 0.898990 | 0.094017 | -0.178378 | 0.104478 | -0.454545 | 0.014493 | 0.894737 | -0.478261 | -0.558282 | -0.389313 | -0.823529 | -0.642857 | -0.939394 | -0.652174 | -0.596165 | -0.634847 | -0.817204 | -0.645793 | -0.940077 | 0 |
data = final
def cv_model(data: pd.DataFrame, y='ICU_SUM', x_drop=['ICU_SUM'],
model=DecisionTreeClassifier(), n_splits=5, n_repeats=10,
description_model='Decision Tree Classifier'):
np.random.seed(8)
data = data.sample(frac=1).reset_index(drop=True)
y = data[y]
x = data.drop(x_drop, axis=1)
model = model
cv = RepeatedStratifiedKFold(n_splits=n_splits, n_repeats=n_repeats)
result = cross_validate(model, x, y, cv=cv, scoring='roc_auc', return_train_score=True)
mean_test = np.mean(result['test_score'])
mean_train = np.mean(result['train_score'])
print(f'AUC test/ train: {mean_test:.2f} - {mean_train:.2f}')
return mean_test, mean_train
#Plot the graph with train and test AUC
def curve_auc(mean_test: list(), mean_train: list(), description_model: str,
n_repeats_x=10):
x = range(1, n_repeats_x)
plt.figure(figsize=(16, 8))
plt.plot(x, mean_test, label='AUC Test', )
plt.plot(x, mean_train, label='AUC Train')
plt.title(description_model, loc='left', fontsize=24)
plt.legend();
cv_model(data, model=LogisticRegression(max_iter=300),
description_model='Logistic Regression')
AUC test/ train: 0.69 - 0.84
(0.6853548644338118, 0.8366514819049975)
cv_model(data)
AUC test/ train: 0.62 - 1.00
(0.6154385964912281, 1.0)
# auc_test_tree: List with the result of mean AUC of test data for each node of the dt model
#auc_treino_tree: List with the result of mean AUC of train data for each node of the dt model
auc_test_tree = list()
auc_train_tree = list()
for i in range(1, 10):
test, train = cv_model(data, model=DecisionTreeClassifier(max_depth=i),
description_model='Decision Tree Classifier')
auc_test_tree.append(test)
auc_train_tree.append(train)
AUC test/ train: 0.63 - 0.65 AUC test/ train: 0.66 - 0.74 AUC test/ train: 0.66 - 0.80 AUC test/ train: 0.65 - 0.86 AUC test/ train: 0.63 - 0.90 AUC test/ train: 0.62 - 0.94 AUC test/ train: 0.60 - 0.96 AUC test/ train: 0.60 - 0.98 AUC test/ train: 0.59 - 0.98
curve_auc(auc_test_tree, auc_train_tree, 'Decison Tree Classifier')
cv_model(data, model=RandomForestClassifier())
AUC test/ train: 0.67 - 1.00
(0.6744355562200959, 1.0)
# auc_test_rf: List with the result of mean AUC of test data for each node of the rf model
# auc_train_rf: List with the result of mean AUC of test data for each node of the rf model
auc_test_rf = list()
auc_train_rf = list()
for i in range(1, 10):
test, train = cv_model(data, model=RandomForestClassifier(max_depth=i),
description_model='Random Forest Classifier')
auc_test_rf.append(test)
auc_train_rf.append(train)
AUC test/ train: 0.68 - 0.80 AUC test/ train: 0.69 - 0.86 AUC test/ train: 0.69 - 0.92 AUC test/ train: 0.69 - 0.96 AUC test/ train: 0.69 - 0.99 AUC test/ train: 0.68 - 1.00 AUC test/ train: 0.69 - 1.00 AUC test/ train: 0.69 - 1.00 AUC test/ train: 0.68 - 1.00
curve_auc(auc_test_rf, auc_train_rf, 'Random Forest Classifier')
cv_model(data, model=SVC())
AUC test/ train: 0.72 - 0.78
(0.7215296052631579, 0.7786115832740984)
SVM is the model that has the best AUC value.
def model_train_test(data: pd.DataFrame, y='ICU_SUM', x_drop=['ICU_SUM'],
model=SVC()):
seed = np.random.seed(1)
data = data.sample(frac=1).reset_index(drop=True)
y = data[y]
x = data.drop(x_drop, axis=1)
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=.3, random_state=seed, stratify=y)
model.fit(x_train, y_train)
y_predicted = model.predict(x_test)
return model, x_train, x_test, y_train, y_test, y_predicted
model_svm, x_train_1, x_test_1, y_train_1, y_test_1, y_predicted_1 = model_train_test(data, model=SVC())
# Plot confusion matrix SVM model
plot_confusion_matrix(model_svm, x_test_1, y_test_1)
plt.title("Confusion Matrix - SVM", loc='left', fontsize=18)
plt.xlabel("Predicted label", fontsize=14)
plt.ylabel("True Label", fontsize=14)
/usr/local/lib/python3.7/dist-packages/sklearn/utils/deprecation.py:87: FutureWarning: Function plot_confusion_matrix is deprecated; Function `plot_confusion_matrix` is deprecated in 1.0 and will be removed in 1.2. Use one of the class methods: ConfusionMatrixDisplay.from_predictions or ConfusionMatrixDisplay.from_estimator. warnings.warn(msg, category=FutureWarning)
Text(0, 0.5, 'True Label')
print(classification_report(y_test_1, y_predicted_1))
precision recall f1-score support 0 0.69 0.70 0.70 57 1 0.65 0.63 0.64 49 accuracy 0.67 106 macro avg 0.67 0.67 0.67 106 weighted avg 0.67 0.67 0.67 106