Algorithm 1: Proposed CNN-GRU for COVID-19 death prediction |
1. Input: COVID-19 dataset D, Number of CNNs N. 2. Initialize GRU parameters. //Preprocess dataset 3. Normalize sample in dataset D. 4. Divide D into 2 subsets: training and testing. 5. Define the CNN layer with filters, kernel size, activation function, and padding. 6. Apply the CNN layer to the input data to extract relevant features. 7. Define the GRU layer with hidden units, activation function, and dropout rate. //Train CNNs 8. For i = 1 to n do 9. Train CNN using the training set //Build the GRU model 10. Add the GRU layer of L1 units and set dropout = d1 and recurrent dropout = s1. 11. Compute update gate dt, reset gate st using Equations (7) and (8). 12. Compute the candidate state pt using Equation (9) 13. While stopping criteria did not met do 14. While training for all instances do 15. Calculate linear function as an activation function used in the output layer. 16. Update weights and bias 17. End while 18. End while //Test the proposed model 19. Test hyperparameters with the test dataset. 20. Return evaluate result in the test dataset. |