Tuesday, May 11, 2021

C19 Update - India (again) and Source Code


CM in India asks: "Can you pl share the outline of your LG3 algorithm that you used for prediction?" 

CH, I have put the python source code in github at

----- GitHub readme file -----

Region fit of Johns Hopkins Covid-19 data using three lognormal functions. This code is open for public use.

Python3 code with several standard library includes. Assumes c19subs.py is in the same directory. The code is a bit sensitive. The fit is across a 12-dimensional parameter space and a good starting point (p0) and set of parameter bounds are essential. The bounds and p0 are generated randomly for each iteration. The core routine is scipy.optomize set with maxfev=5000, but if p0 or bounds are pathelogical optomize may run to full 5000 function evals without convergence and code will terminate with error. Rare event, just run it again and hope for the best.

The user needs to supply an accuracy goal, this is set to target=500 which seems suitable for India as of 9 May 2021.

To run code from the command line:

python fitLG3region.py

With (a) result:

searching: iter= 1  goal= 500.0  accuracy= 50600
searching: iter= 2  goal= 500.0  accuracy= 10000000
searching: iter= 3  goal= 500.0  accuracy= 90499345
.
.
.
searching: iter= 34  goal= 500.0  accuracy= 120131516
searching: iter= 35  goal= 500.0  accuracy= 357248
searching: iter= 36  goal= 500.0  accuracy= 463

The generated fit for this run is in the file LG3_May09_India.pdf

Author: Christopher Liner

-----



Friday, May 7, 2021

C19 Update India

From CM in India: As you know India is totally gripped by the second wave of Corona. People are speculating about when the third wave will hit us and how deadly it will be. I shall be personally thankful to you if you can run your ANN prediction for India data.

Dear CM: I ran the best neural network I have come up with to no avail. With an accuracy target of 2500 it took 49 iterations and still did not fit the data in any meaningful way. As you probably know, over the course of C19 my work on neural nets only managed to confirm what experienced NN workers have long known -- neural nets are not very good at predicting outside of the given data. So the NN was a flop. But, I did manage to get a decent fit on my LG3 model. This is a sum of three lognormal functions with 12 free parameters used to fit the data. Like all data fitting approaches, the key is choice of starting parameter values. Anyway, here is the India C19 deaths plot fit to my LG3 model. On the current steep trajectory, we can expect the predicted peak location and value to change rapidly with new data points. Even so, it looks like difficult times ahead for my many friends in India. 



Thursday, May 6, 2021

C19 Update

 It has been a while, but here is the current AR-US-World plot. The world is not looking good.