Skip to main content
. 2021 Jul 28;11:15343. doi: 10.1038/s41598-021-93543-8
Algorithm 1. CNN-AE pseudo-code
Input: dataset D={DrecoveredDdeceased}, training epochs N, batch size B, number of folds K
// Auto-encoders initialization
1: Create 10 autoencoders with initial random parameters: {AE1,,AE10}
// Autoencoders training
2: Partition samples in Drecovered to 10 subsets:{g1,,g10}
3: For i = 1:10
4:    Train AEi on Drecovered-gi and perform validation on gi
// Augmented data generation
5: A=[]
6: For i = 1:10
7:    ai=AEi(Ddeceased)
8:    A =Aai
9: Daugmented=DA
10: Create CNN C with initial random parameters
11:

// K-Fold cross validation

Partition Daugmented to 90% training set Dtrain and 10% test set Dtest

12: Partition Dtrain to K subsets F1,,FK
13: For k = 1:K
14:    Dtrain=Daugmented-FK
15:    Dvalid=FK
16:    For e = 1:N
17:       batcht = sample_batch(Daugmented,B)
18:       CNN.train(batcht)
19:       batchv = sample_batch(Dvalid,B)
20:       CNN.validate(batchv)
21: CNN.test(Dtest)
22: Return CNN