Skip to main content
[Preprint]. 2023 Nov 14:rs.3.rs-3487939. [Version 1] doi: 10.21203/rs.3.rs-3487939/v1

Algorithm 1.

Train, tune, and evaluate a model to predict if a patient should be placed on CRRT.

1: Dtrain+val⇐ choose from {UCLA: CRRT, UCLA: Control, Cedars: CRRT }
2: Dtest⇐ choose from {UCLA: CRRT, UCLA: Control, Cedars: CRRT }
3: if Dtrain+val=Dtest then
4:  Dtrain,Dval,Dtest⇐Dtrain+val*[0.6,0.2,0.2] ▷ Split dataset into 60/20/20% respectively.
5: else
6:  Dtrain,Dval⇐Dtrain+val*[0.8,0.2] ▷ Split dataset into 80/20% respectively.
7: end if
8: w⇐{1,2,3,4,5,6,7,10,14} days ▷ look-back window size
9: m⇐{lgbm,xgb,rf} ▷ model type
10: i⇐{mean/mode,knearestneighbors} ▷ imputation method
11: f⇐{kbest,correlationthreshold} ▷ feature selection method
12: ℍ⇐{w,m,i,f} ▷ Set hyperparameter grid
13: function Tuning (ℍ,Dtrain,Dval)
14:  metrics ⇐ {}
15:  for wj,mj,ij,fj∈ℍ do
16:   Train mj(fj(ij(Dtrain)))
17:   metrics⇐+Evaluatemj(fj(ij(Dval)))
18:  end for
19:  m*⇐mj such that corresponding metric is max/min (best)
20:  return m*
21: end function
22: m*⇐Tuning(ℍ,Dtrain,Dval)
23: metrics ⇐ Evaluate m*(Dtest)
24: subpopulations ⇐ (heart, liver, infection) × (male, female, race)
25: for subpopulation in subpopulations do
26:  metrics by subpopulation ⇐ Evaluate m*(Dtest*subpopulation)
27: end for