Skip to content

Commit f58499b

Browse files
author
LProcopi15
authored
Update Week4_mortality.R
1 parent 2baa4a8 commit f58499b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Week 4 - Case Study/Week4_mortality.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ View(MD)
1414

1515
#1.2 Read the description files and understand what is each attributes.
1616
#Rename attributes if you find it helpful
17-
colnames(MD) <- c('Length.Of.Stay','Disease.Class','Comorbidities','Coma.Score','Care.Intensity','Mean.BP','WBC','Heart.Rate','Temperature','Blood.Gases','Albumin','Bilirubin','Creatinine','Sodium','Adjusted.Shock.Index','Age','Sex','Race','Death')
18-
1917

2018
#1.3 Check the class of each variables.
2119

@@ -36,7 +34,6 @@ colnames(MD) <- c('Length.Of.Stay','Disease.Class','Comorbidities','Coma.Score',
3634

3735

3836
#2.2.1 Temperature: mean imputation
39-
mean(MD$Temperature, na.rm = TRUE)
4037

4138

4239
#Additional question: why can we use mean imputation for temperature? Consider the disbribution of temp attribute.
@@ -51,9 +48,6 @@ mean(MD$Temperature, na.rm = TRUE)
5148
#Consider the real meaning of the attributes. Let's convert the attribute into a factor with two levels, ventilator patients and non-ventilator patients
5249
#Hint: you can use cut function. Type ?Cut to see the usage of the function
5350
# ventilator patients non-ventilator patients
54-
MD$Blood.Gases[which(is.na(MD$Blood.Gases))] <- 0
55-
max(MD$Blood.Gases)
56-
MD$Blood.Gases <- cut(MD$Blood.Gases, c(0, 32, 870))
5751

5852

5953
#In medical world, bili and albi are measured in the same test.

0 commit comments

Comments
 (0)