Saturday, June 27, 2020

C19 Update with Italy + TensorFlow World NN


2020-06-27

Total US C19 deaths 125,039

Last five daily = [ 423  829  754 2425  629]

Future estimates

   124824 +/- 1912  =  Jul 1 total (95% confidence)

   134802 +/- 1912  =  Aug 1

   139836 +/- 1912  =  Sep 1


Total world C19 deaths 494,181

Last five daily = [3588 5416 5171 6554 4869]

Future estimates

   491466 +/- 178878  =  Jul 1 total (95% confidence)

   578344 +/- 178878  =  Aug 1

   645159 +/- 178878  =  Sep 1


Total Italy C19 deaths 34,708

Last five daily = [ 23  18 -31  34  30]

Future estimates

   34903 +/- 109  =  Jul 1 total (95% confidence)

   35365 +/- 109  =  Aug 1

   35513 +/- 109  =  Sep 1


Total Arkansas C19 deaths 249

Last five daily = [ 2 10  3  0  9]



New neural network implementation is presented today. This uses Keras and TensorFlow. The model architecture is given below the figure. In this version the input data is split into a randomly selected training part (80%) and a testing, or validation, part (20%). The lower plot shows computed error against the train and validate data at each training pass (epoch). We see the error reducing similarly for the train and validate data, which is good. If the train error is much lower than the validate error the data is being overfit because there are too many parameters in the model. 

Our error behavior looks fine, but it is quite possible that a simpler network (fewer hidden layers and neurons per layer) would produce similar results. After all, before today we were fitting the data using 15 neurons in one hidden layer, a total of 48 trainable parameters. Amazing it worked as well as it did.

Predictions for world daily C19 deaths from this NN

4343  =  Jul 1 daily (day 161)

4302  =  Aug 1 daily (day 192)

4378  =  Sep 1 daily (day 223)

 

Model: "sequential"

____________________________________________

Layer (type)                 Output Shape              Param #   

=======================================

dense (Dense)                (None, 1)                 2         

____________________________________________

dense_1 (Dense)              (None, 64)                128       

____________________________________________

dense_2 (Dense)              (None, 64)                4160      

____________________________________________

dense_3 (Dense)              (None, 64)                4160      

____________________________________________

dense_4 (Dense)              (None, 64)                4160      

_____________________________________________

dense_5 (Dense)              (None, 64)                4160      

_____________________________________________

dense_6 (Dense)              (None, 1)                 65        

========================================

Total params: 16,835

Trainable params: 16,835

Non-trainable params: 0