-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting close to zero forecast values in prediction. #3
Comments
Dear Sarang,
Thanks for reaching out. I will have a look at the datafile today, and also plan to update the code on githib the coming days as there are some further recent improvements, and I also will update the documentation
Kind regards,
Jan-Diederik
From: sarang-kharpate ***@***.***>
Sent: Friday, May 7, 2021 8:08 AM
To: TNO/Covid-SEIR ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [TNO/Covid-SEIR] Getting negative forecast values in prediction. (#3)
Hello Jan-Diederik,
I am trying to utilize this model for my NCR region (where total population size is mostly 13 million). I have used your netherlands_april9_narrow.json as a reference and corona_esmda.py as a modelling technique.
In terms of parameters for my NCR regions I have changed the following parameters.
"t_max" : 350,
"population": 13e6,
"alpha" : [[0.1,0.5],[0.1,0.5],[0.6,0.8],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.8,1.0]],
"dayalpha" : [1, 14, 33, 48, 61, 91, 122, 152, 183, 214, 242, 270],
"xmaxalpha": 280,
All the others numbers were unchanged. When I ran this with above parameters, the forecasted values I mostly got were close to zero for P5,P25,P50,P75,P90 in all the output file (e.g. posterior_prob_hospitalizedcum_calibrated_on_hospitalizedcum, ICU_calibrated_on_hospitalizedcum, infected_calibrated_on_hospitalizedcum etc.)
I have also attached the data and the changed parameter file that I have used for your reference.
Need your help and suggestion on the same and also wanted to know if we want to replicate this for any other region, what changes we need to incorporate in parameters to get a good forecast and what is the rationally behind changing the parameters.
I have attached my configuration file and input file as well.
NCR_7_May.txt<https://github.com/TNO/Covid-SEIR/files/6439361/NCR_7_May.txt>
input_file_7_May.txt<https://github.com/TNO/Covid-SEIR/files/6439367/input_file_7_May.txt>
input_file_icufrac_7_May.txt<https://github.com/TNO/Covid-SEIR/files/6439368/input_file_icufrac_7_May.txt>
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#3>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2XGKYU3APXOBQCZV2Z2TTTMN7TRANCNFSM44JCTUAA>.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
|
Dear Sarang,
Attached you find an input file which should work I think (NCR_7_May2.txt).
The reason why you got the wrong results, mainly because:
1. The beginning of the data series already has large values of hospitalized and ICU, best if the timeseries start from a low value.
2. The fit on hospitalized did not work as this is a fit for column 6 and you put the column with hospitalized in column 4 (but this appears daily hospitalized (needs to be accumulated) or actual occupance (as ICU) but then needs to be in column 6. I interpreted it the latter way and shifted column 4 to 6
3. I played a bit with ICUfrac (not reading from file but keeping constant over time), to obtain a reasonable fit with the hospitalized
Kind regards,
Jan-Diederik
From: sarang-kharpate ***@***.***>
Sent: Friday, May 7, 2021 8:08 AM
To: TNO/Covid-SEIR ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [TNO/Covid-SEIR] Getting negative forecast values in prediction. (#3)
Hello Jan-Diederik,
I am trying to utilize this model for my NCR region (where total population size is mostly 13 million). I have used your netherlands_april9_narrow.json as a reference and corona_esmda.py as a modelling technique.
In terms of parameters for my NCR regions I have changed the following parameters.
"t_max" : 350,
"population": 13e6,
"alpha" : [[0.1,0.5],[0.1,0.5],[0.6,0.8],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.8,1.0]],
"dayalpha" : [1, 14, 33, 48, 61, 91, 122, 152, 183, 214, 242, 270],
"xmaxalpha": 280,
All the others numbers were unchanged. When I ran this with above parameters, the forecasted values I mostly got were close to zero for P5,P25,P50,P75,P90 in all the output file (e.g. posterior_prob_hospitalizedcum_calibrated_on_hospitalizedcum, ICU_calibrated_on_hospitalizedcum, infected_calibrated_on_hospitalizedcum etc.)
I have also attached the data and the changed parameter file that I have used for your reference.
Need your help and suggestion on the same and also wanted to know if we want to replicate this for any other region, what changes we need to incorporate in parameters to get a good forecast and what is the rationally behind changing the parameters.
I have attached my configuration file and input file as well.
NCR_7_May.txt<https://github.com/TNO/Covid-SEIR/files/6439361/NCR_7_May.txt>
input_file_7_May.txt<https://github.com/TNO/Covid-SEIR/files/6439367/input_file_7_May.txt>
input_file_icufrac_7_May.txt<https://github.com/TNO/Covid-SEIR/files/6439368/input_file_icufrac_7_May.txt>
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#3>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2XGKYU3APXOBQCZV2Z2TTTMN7TRANCNFSM44JCTUAA>.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
{
"worldfile": false,
"country": "../res/input_file_7_May.txt",
"startdate": "7/2/20",
"t_max" : 460,
"dt" : 0.1,
"time_delay": 12,
"population": 13e6,
"nr_prior_samples": 100,
"nr_forecast_samples": 1500,
"esmda_iterations": 8,
"esmda_ignoredays": 0,
"N" : {
"type": "uniform",
"min": 50000,
"max": 300000
},
"sigma" : 0.2,
"gamma" : 0.5 ,
"R0" : {
"type": "normal",
"mean": 3.2,
"stddev": 0.0
},
"m": 0.9,
"c_alpha" : [[0.1,0.5],[0.1,0.5],[0.6,0.8],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.8,1.0]],
"c_dayalpha" : [1, 14, 33, 48, 61, 91, 122, 152, 183, 214, 242, 270],
"alpha" : [[0.1,0.8],[0.3,0.8],[0.3,0.8],[0.3,0.8],[0.3,0.8],[0.8,1.0]],
"dayalpha" : [1, 20, 180, 214, 242, 270],
"delayHOS" : {
"type": "uniform",
"min": 9,
"max": 9
},
"delayHOSREC" : {
"type": "uniform",
"min": 14,
"max": 14,
"smooth_sd": 4
},
"delayHOSD" : {
"type": "uniform",
"min": 1,
"max": 4
},
"delayREC" : 12,
"delayICUCAND": {
"type": "uniform",
"min": 0,
"max": 0,
"smooth_sd": 2
},
"delayICUD": {
"type": "uniform",
"min": 7,
"max": 7,
"smooth_sd": 3
},
"delayICUREC": {
"type": "uniform",
"min": 28,
"max": 32,
"smooth_sd": 8
},
"hosfrac" : 0.05,
"dfrac" : 0.29,
"icudfrac" : 0.3,
"ICufrac": 0.075,
"c_ICufrac": {
"type":"normal",
"mean": 0.19,
"stddev": 0.01
},
"c_icufracfile": "../res/input_file_icufrac_7_May.txt",
"calibration_mode": [5],
"observation_error": [100.0],
"YMAX": 200e3,
"XMAX": 360,
"hist_time_steps": [30,35,40,60],
"p_values": [0.05, 0.3, 0.5, 0.7, 0.95],
"plot" : {
"legendloc" : "best",
"legendfont" : "x-small",
"y_axis_log": false,
"hindcast_plume": true,
"xmaxalpha": 360,
"casename": "India-NCR"
}
}
1 27048 1283 18471 0 166 1560
2 28014 1300 19053 0 202 2363
3 28652 1328 19554 0 220 2615
4 29196 1346 20478 0 243 2822
5 30436 1359 21375 0 273 3018
6 31669 1381 22144 0 290 3147
7 32903 1404 23464 0 301 3280
8 34639 1422 24172 0 290 3271
9 36203 1449 25015 0 293 3437
10 37366 1467 25826 0 296 3558
11 38281 1489 26848 0 313 3605
12 39611 1515 27444 0 345 3823
13 40870 1548 27888 0 363 3955
14 42510 1586 28606 0 368 3969
15 44199 1618 30222 0 414 4056
16 45984 1663 31167 0 342 4119
17 47163 1712 32598 0 333 4117
18 47756 1743 33887 0 347 4206
19 49636 1774 35042 0 340 4187
20 51463 1803 36236 0 355 4367
21 53329 1844 37053 0 407 4577
22 55196 1884 38331 0 364 4512
23 57150 1930 39545 0 371 4559
24 58250 1963 40422 0 373 4639
25 58988 1998 41433 0 369 4597
26 61202 2047 42502 0 363 4748
27 63006 2088 43330 0 379 4826
28 64548 2124 44334 0 376 4810
29 66208 2159 46032 0 384 4792
30 67373 2185 47947 0 399 4807
31 68411 2223 50315 0 392 4921
32 68998 2259 52670 0 401 4957
33 70685 2291 54176 0 410 4893
34 72395 2332 57071 0 411 4961
35 73904 2374 59557 0 437 4891
36 75713 2433 61574 0 400 4812
37 77489 2474 63516 0 430 4754
38 78580 2515 66000 0 420 4766
39 79485 2554 67781 0 415 4828
40 81681 2589 71526 0 413 4927
41 83730 2641 73227 0 410 4823
42 85693 2699 76034 0 412 4830
43 87250 2744 78310 0 406 4750
44 88871 2775 81995 0 409 4846
45 89728 2823 84255 0 438 4774
46 90236 2863 85967 0 448 4735
47 91930 2910 87764 0 444 4790
48 93449 2940 90527 0 450 4839
49 94816 2978 93444 0 422 4803
50 96201 3008 95712 0 437 4827
51 97239 3042 97971 0 427 4794
52 97938 3084 100472 0 431 4517
53 98436 3113 101577 0 423 4758
54 99924 3149 103805 0 422 4844
55 101338 3184 105449 0 418 4757
56 102713 3228 108241 0 426 4737
57 104025 3262 109929 0 452 4696
58 105263 3298 111807 0 444 4704
59 105863 3330 113535 0 438 4765
60 106248 3364 115379 0 441 4724
61 107050 3398 117152 0 442 4660
62 108499 3429 118888 0 399 4533
63 109926 3458 119982 0 443 4478
64 111282 3490 120964 0 445 4484
65 112511 3520 122787 0 452 4376
66 113093 3544 123839 0 453 4434
67 113469 3571 124747 0 390 4317
68 114275 3592 125436 0 457 4413
69 115418 3621 126899 0 453 4427
70 116523 3650 128317 0 435 4373
71 117462 3669 130321 0 449 4343
72 118243 3689 132330 0 429 4303
73 119387 3708 134655 0 435 4336
74 120121 3731 136094 0 524 4232
75 121005 3761 138231 0 461 4221
76 121814 3788 139814 0 452 4214
77 122711 3809 141366 0 397 4158
78 123739 3832 142590 0 446 4203
79 124656 3850 143975 0 467 4152
80 125017 3869 145324 0 462 4090
81 125278 3896 146542 0 453 4006
82 126072 3919 147945 0 459 3960
83 126826 3938 148805 0 459 3931
84 127546 3961 150152 0 457 3841
85 128212 3983 151057 0 442 3802
86 128889 4004 152274 0 431 3681
87 129256 4018 153313 0 426 3704
88 129501 4033 154318 0 428 3779
89 130222 4043 155488 0 440 3736
90 130840 4065 156191 0 426 3712
91 131506 4080 157115 0 407 3708
92 132192 4107 158061 0 411 3735
93 132660 4119 159180 0 420 3683
94 133035 4129 159941 0 405 3668
95 133271 4144 160952 0 382 3751
96 133891 4161 161750 0 418 3665
97 134465 4176 162431 0 414 3619
98 134992 4187 163412 0 411 3670
99 135456 4196 164123 0 404 3584
100 135927 4213 164968 0 422 3583
101 136211 4229 165500 0 402 3581
102 136475 4236 166142 0 401 3446
103 137112 4254 167131 0 412 3591
104 137575 4262 167721 0 403 3577
105 138023 4269 168420 0 397 3503
106 138391 4280 169259 0 399 3403
107 138741 4292 170138 0 398 3203
108 138972 4305 170734 0 381 3203
109 139191 4314 171489 0 390 3230
110 139619 4329 172264 0 387 3321
111 140054 4336 172880 0 381 3197
112 140382 4342 173455 0 340 3197
113 140676 4356 174078 0 349 3170
114 140986 4369 174796 0 344 3088
115 141196 4373 175460 0 344 3148
116 141320 4382 176145 0 351 3028
117 141614 4389 176708 0 369 3114
118 141954 4393 177251 0 375 3073
119 142296 4401 177820 0 371 3011
120 142574 4410 178395 0 359 2977
121 142912 4417 178960 0 353 2947
122 143091 4425 179545 0 344 2849
123 143213 4430 180129 0 340 2875
124 143386 4434 180726 0 346 2852
125 143815 4447 181230 0 334 2937
126 144146 4454 181598 0 348 2863
127 144476 4457 182009 0 322 2881
128 144815 4463 182550 0 326 2869
129 144990 4467 183061 0 322 2805
130 145107 4473 183585 0 339 2832
131 145391 4474 184099 0 344 2923
132 145728 4477 184555 0 347 2884
133 146023 4483 184911 0 342 2875
134 146193 4488 185181 0 338 2871
135 146381 4495 185524 0 331 2852
136 146579 4504 185842 0 322 2780
137 146691 4511 186282 0 314 2705
138 146980 4513 186669 0 328 2739
139 147230 4517 186981 0 318 2764
140 147511 4523 187378 0 295 2944
141 147726 4527 187684 0 308 2821
142 148024 4535 188136 0 310 2697
143 148194 4541 188489 0 297 2655
144 148309 4549 188969 0 253 2529
145 148573 4551 189327 0 303 2609
146 148837 4556 189579 0 291 2557
147 149180 4559 189842 0 291 2541
148 149461 4566 190100 0 297 2631
149 149715 4572 190575 0 301 2634
150 149922 4577 190915 0 294 2568
151 150031 4580 191354 0 290 2630
152 150208 4583 191708 0 321 2696
153 150549 4590 192012 0 323 2795
154 150833 4592 192283 0 317 2793
155 151092 4594 192542 0 309 2779
156 151412 4604 192795 0 322 2797
157 151586 4605 193215 0 312 2698
158 151694 4607 193618 0 300 2746
159 152032 4610 194044 0 326 2752
160 152240 4616 194403 0 324 2726
161 152591 4617 194778 0 323 2740
162 152879 4621 195066 0 317 2755
163 153144 4623 195430 0 308 2666
164 153336 4624 195800 0 319 2674
165 153440 4629 196184 0 319 2671
166 153814 4632 196679 0 332 2681
167 154188 4648 196996 0 347 2727
168 154499 4652 197291 0 341 2757
169 154819 4655 197656 0 345 2731
170 155150 4662 198253 0 330 2720
171 155404 4667 198661 0 379 2651
172 155525 4671 199118 0 360 2617
173 155954 4678 199736 0 322 2652
174 156224 4680 200115 0 335 2669
175 156446 4686 200527 0 319 2720
176 156553 4690 201009 0 326 2581
177 156637 4694 201553 0 264 2412
178 156817 4699 202028 0 310 2482
179 156934 4702 202300 0 297 2455
180 157328 4708 202610 0 314 2542
181 157599 4712 202973 0 314 2545
182 157775 4715 203264 0 308 2526
183 157896 4718 203749 0 306 2409
184 158742 4723 204116 0 292 2234
185 159019 4728 204312 0 312 2331
186 159298 4732 204469 0 328 2361
187 159970 4739 204793 0 334 2524
188 161059 4743 205056 0 333 2620
189 161348 4746 205371 0 324 2617
190 161697 4750 205729 0 343 2577
191 161981 4752 206117 0 290 2600
192 162174 4757 206453 0 324 2652
193 162313 4764 206835 0 332 2595
194 162659 4769 207241 0 334 2637
195 162988 4775 207551 0 327 2692
196 163300 4778 207833 0 319 2678
197 163593 4781 208207 0 323 2695
198 163902 4787 208588 0 323 2705
199 164094 4790 209063 0 323 2664
200 164204 4795 209491 0 319 2662
201 164585 4798 209880 0 336 2610
202 164903 4808 210222 0 326 2534
203 165194 4814 210501 0 310 2523
204 165490 4818 210916 0 305 2538
205 165756 4825 211488 0 307 2506
206 165969 4835 211820 0 307 2608
207 166090 4843 212188 0 299 2526
208 166396 4847 212591 0 309 2730
209 166675 4852 212851 0 300 2688
210 167003 4855 213225 0 328 2775
211 167267 4862 213540 0 338 2686
212 167542 4866 213943 0 335 2640
213 167731 4869 214387 0 330 2546
214 167830 4871 214757 0 319 2497
215 168169 4873 215171 0 290 2574
216 168396 4878 215481 0 314 2717
217 168788 4882 215842 0 285 2586
218 169268 4886 216251 0 308 2635
219 169792 4890 216784 0 324 2588
220 170005 4895 217127 0 308 2546
221 170153 4900 217595 0 342 2432
222 170493 4903 217947 0 308 2563
223 170786 4907 218286 0 320 2568
224 171085 4910 218582 0 321 2547
225 171445 4915 218895 0 314 2572
226 171666 4920 219300 0 317 2595
227 171869 4922 219657 0 326 2605
228 172008 4930 220003 0 307 2605
229 172474 4933 220334 0 290 2535
230 172927 4939 220610 0 281 2653
231 173364 4941 220986 0 277 2708
232 173869 4947 221493 0 243 2567
233 174437 4951 222075 0 314 2668
234 174791 4952 222617 0 312 2667
235 175073 4959 223227 0 323 2650
236 175874 4965 223918 0 324 2744
237 176643 4974 224335 0 324 2821
238 177427 4978 224794 0 326 2868
239 178013 4984 225630 0 338 2892
240 178785 4991 226559 0 341 2938
241 179311 4995 227512 0 347 2936
242 179735 5003 228363 0 356 3054
243 180839 5011 229247 0 364 3071
244 181899 5019 230025 0 341 3112
245 183125 5029 230689 0 343 3219
246 184789 5033 231680 0 366 3272
247 186337 5047 232787 0 357 3419
248 187432 5057 233923 0 353 3437
249 188181 5064 235001 0 382 3536
250 190026 5075 236212 0 401 3749
251 191779 5085 237208 0 428 3838
252 193820 5096 238468 0 436 3868
253 195877 5110 240077 0 436 4060
254 198380 5124 242080 0 478 4225
255 200480 5142 244044 0 461 4230
256 201830 5159 245939 0 494 4302
257 205336 5176 248393 0 468 4409
258 208698 5199 250365 0 478 4732
259 212476 5213 252452 0 492 4732
260 216251 5239 254882 0 511 4952
261 219803 5267 258249 0 493 5039
262 222411 5301 261680 0 564 4850
263 224049 5332 265446 0 568 5212
264 228911 5359 269198 0 520 5478
265 233299 5392 272773 0 538 5592
266 237994 5420 276519 0 618 5628
267 242567 5449 281546 0 549 5833
268 247766 5481 287030 0 557 6006
269 251209 5504 292259 0 545 6060
270 253246 5538 297549 0 596 6371
271 258463 5567 303503 0 591 6283
272 263957 5609 309276 0 632 6517
273 269474 5634 313091 0 602 6624
274 272412 5666 319114 0 636 6730
275 274030 5698 327578 0 642 6876
276 276893 5734 335397 0 635 6728
277 278892 5759 341992 0 588 6841
278 284815 5790 346014 0 661 6925
279 289903 5826 349894 0 688 6812
280 294646 5866 352983 0 597 7028
281 299336 5904 357363 0 641 6960
282 303387 5922 363188 0 730 6959
283 306398 5944 369210 0 688 7018
284 308145 5971 374955 0 634 6891
285 313461 5996 380153 0 644 7221
286 318301 6034 384283 0 693 7138
287 322483 6058 388207 0 666 7142
288 326595 6086 393645 0 657 7287
289 330793 6120 398845 0 689 7160
290 333441 6147 403340 0 710 7190
291 334890 6175 407894 0 637 7100
292 338909 6202 411575 0 655 7027
293 342458 6223 414316 0 634 6979
294 345868 6246 418348 0 621 6902
295 349235 6269 422464 0 675 6875
296 352637 6293 425881 0 661 6706
297 354858 6311 429511 0 669 6663
298 356203 6337 431783 0 663 6531
299 359698 6360 433484 0 662 6645
300 363103 6370 434512 0 752 6547
301 366048 6391 435368 0 797 6394
302 368533 6404 435832 0 787 6217
303 370542 6413 436054 0 804 6294
304 371360 6420 436279 0 788 6170
305 371523 6420 436415 0 850 6153
306 371524 6420 436450 0 867 6123
|
Hi Jan-Diederik, First of all, thank for going through our problem statement and helping us out in this. Really appreciate it. Few questions I have
It will be really helpful if you can guide us as to what should be our input columns be exactly like. |
Hi Sarang,
Thanks
Regarding your questions:
1. This refers to the data column, so 5 is IC units used. The way it is specified in a list allows to do a calibration on multiple columns at a time.
2. The calibration error is constant over the time range modelled, but you can exclude a starting number of days from fitting (the parameter "esmda_ignoredays":60). The number is absolute for columns 1,2,3,4 and interpreted as percentage (from 0 to 100) for 5 and 6. A 100% data error is save way to start the assimilation, to avoid overfitting if the model is not well capable to reproduce the data. Columns are as specified in the github page
3. For extended the timeseries. Most likely this is not what you want to do, as you are putting emphasis on fitting data in the past. I forgot to mention you can also allow the model to grow into more infections at day 1 by putting a significantly higher number of timedelay, i.e. "time_delay": 27,this works well to overcome many of the erroneous results with negative values
4. That is correct. I would not encourage to put 0, but estimates of what it could have been, but as mentioned in 2, the esmda_ignoredays also does the job well I think in combination with time_delay mentioned in 3. The github specification is correct, the input you had sent I think contained in column 4 actual hospitalized (which should be column 6).
Zeros in column 4 are fine, as long as you do not use them for data assimilation). With the changes above I provide you as an example with a joint assimilation for the both column 5 (ICU) and actual hospitalized (column 6). The joint fit is achieved through the variation in ICufrac
"ICufrac": {
"type":"normal",
"mean": 0.075,
"stddev": 0.01
},
And ignores currently ignores the icufrac file which I commented out by the heading c_ "c_icufracfile":
It appears that the best fit (1-alfa) is decreasing sharply in the first months of 2021. If it is not caused by seasonal effects or relaxation of social distancing measures, this might also be in line with what you could expect from the entrance of VOC with ca 50% higher reproduction number such as the British mutant. This would also be in line with the 2-3 months it takes to become dominant (as seen in London area and European countries). We have seen the same in the past months in the Netherlands (but started lockdown at the start of entering of the VOC).
Kind regards,
Jan-Diederik
From: sarang-kharpate ***@***.***>
Sent: Saturday, May 8, 2021 2:39 AM
To: TNO/Covid-SEIR ***@***.***>
Cc: Wees, J.D.A.M. (Jan Diederik) van ***@***.***>; Comment ***@***.***>
Subject: Re: [TNO/Covid-SEIR] Getting close to zero forecast values in prediction. (#3)
Hi Jan-Diederik,
First of all, thank for going through our problem statement and helping us out in this. Really appreciate it.
Few questions I have
1. Calibration mode [5] indicates 'infected' or 'hospitalizedcum'?
2. Can we keep observation errors constant across different calibration modes e.g. 100 in this case.
3. We have numbers for infected, dead and recovered data starting from March 2020,but hospitals numbers are recorded from July 2020, because of this we decided to take input data from July only, which in turn causing this large numbers in start of data as numbers are getting cumulated from March-July. Can we put 0 for data related to hospitals and ICU for period from March to July? This will keep initial numbers of infected, dead and recovered on lower side for first 90 days of input data period.
4. Input file columns as per below condition as stated on github page.
column 0 - day (number starting from 1)
column 1 - cumulative registered infected (positive test cases)
column 2 - cum dead
column 3 - cum recovered
column 4 - cumulative hospitalized
column 5 - actual IC units used (may be estimated or 0)
column 6 - actual hospitalized (put all to 0 to overwrite from estimates calculated from the hospital flow model)
It will be really helpful if you can guide us as to what should be our input columns be exactly like.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2XGKZD2ITSDCCFDLIIHPTTMSB2HANCNFSM44JCTUAA>.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
{
"worldfile": false,
"country": "../res/input_file_7_May.txt",
"startdate": "7/2/20",
"t_max" : 460,
"dt" : 0.1,
"time_delay": 27,
"population": 13e6,
"nr_prior_samples": 100,
"nr_forecast_samples": 1500,
"esmda_iterations": 8,
"esmda_ignoredays": 60,
"N" : {
"type": "uniform",
"min": 50000,
"max": 300000
},
"sigma" : 0.2,
"gamma" : 0.5 ,
"R0" : {
"type": "normal",
"mean": 3.2,
"stddev": 0.0
},
"m": 0.9,
"c_alpha" : [[0.1,0.5],[0.1,0.5],[0.6,0.8],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.8,1.0]],
"c_dayalpha" : [1, 14, 33, 48, 61, 91, 122, 152, 183, 214, 242, 270],
"alpha" : [[0.3,0.8],[0.3,0.8],[0.3,0.8],[0.3,0.8],[0.3,0.8],[0.3,0.8],[0.5,1.0],[0.5,1.0],[0.5,1.0]],
"dayalpha" : [1, 90, 120, 180, 214, 242, 270, 280, 290],
"delayHOS" : {
"type": "uniform",
"min": 9,
"max": 9
},
"delayHOSREC" : {
"type": "uniform",
"min": 14,
"max": 14,
"smooth_sd": 4
},
"delayHOSD" : {
"type": "uniform",
"min": 1,
"max": 4
},
"delayREC" : 12,
"delayICUCAND": {
"type": "uniform",
"min": 0,
"max": 0,
"smooth_sd": 2
},
"delayICUD": {
"type": "uniform",
"min": 7,
"max": 7,
"smooth_sd": 3
},
"delayICUREC": {
"type": "uniform",
"min": 28,
"max": 32,
"smooth_sd": 8
},
"hosfrac" : 0.02,
"dfrac" : 0.29,
"icudfrac" : 0.3,
"c_ICufrac": 0.075,
"ICufrac": {
"type":"normal",
"mean": 0.075,
"stddev": 0.01
},
"c_icufracfile": "../res/input_file_icufrac_7_May.txt",
"calibration_mode": [5,6],
"observation_error": [50.0, 50.0],
"YMAX": 1000e3,
"XMAX": 360,
"hist_time_steps": [30,35,40,60],
"p_values": [0.05, 0.3, 0.5, 0.7, 0.95],
"plot" : {
"legendloc" : "best",
"legendfont" : "x-small",
"y_axis_log": false,
"hindcast_plume": true,
"xmaxalpha": 360,
"casename": "India-NCR"
}
}
|
Hello Jan-Diederik, Thanks for the guidance. With your help in tuning parameter files along with input file changes we are able to get pretty good fit and projection for Hospitalized and ICU values. The code is mimicking the trend pretty closely. I have attached new input file and latest configuration files. I do have few more questions for you
even if we use [1] only it still gets errors out. But it runs smoothly for [5, 6] calibration mode. Am I putting something wrong in any parameters?
Thanks NCR_10_May_best.txt |
Hello Sarang,
Thanks for the questions.
Regarding the error with the cumulative infections, that is I think caused by an erroneous input for the error range on this. For 1,2,3,4 it should be absolute and I have chosen a very large value in the attached file (100000), then in principle it works.
However with the 1,5,6 it is also good to increase the number of runs 200-500 and you need to have uncertainty in the transfer from infected to hospitalized (hosfrac) and the relative fraction of hospitalized going to ICU.
I have also allowed to vary more the treatment times for hospitalizion and ICU and then I get a rather good fit for 5,6 and loose fit for 1.
To make it work I also ignored a fit for the first 100 days.
For question 3: I think you are correct
Kind regards,
Jan-Diederik
From: sarang-kharpate ***@***.***>
Sent: Tuesday, May 11, 2021 8:30 AM
To: TNO/Covid-SEIR ***@***.***>
Cc: Wees, J.D.A.M. (Jan Diederik) van ***@***.***>; Comment ***@***.***>
Subject: Re: [TNO/Covid-SEIR] Getting close to zero forecast values in prediction. (#3)
Hello Jan-Diederik,
Thanks for the guidance. With your help in tuning parameter files along with input file changes we are able to get pretty good fit and projection for Hospitalized and ICU values. The code is mimicking the trend pretty closely. I have attached new input file and latest configuration files. I do have few more questions for you
1. We are still getting very high values for infected predictions( P0.095 and observed for file NCR_10_May_best_posterior_prob_infected_calibrated_on_[5, 6].csv),
and when we try to optimize parameter for infection related changes ( e.g. m, R0, sigma, gamma values) our hospital prediction also get changes.
2. When we try to use calibration mode as [1, 5, 6] code errors out like
(numpy.linalg.LinAlgError: Singular matrix error)
even if we use [1] only it still gets errors out. But it runs smoothly for [5, 6] calibration mode. Am I putting something wrong in any parameters?
1. This code generates .h5 file in output folder. If I explore .h5 file I can see model and posterior sub sections in h5 file. I think columns are forecasted values for time, susceptible, exposed, infected, remove, hospital, hospital cumulative, ICU, ICU cumulative, recovered ,dead and alpha run. All predicted by model.
Is my interpretation correct for 13 columns present in file?
df = pd.DataFrame(hf['model']['posterior'][0]).T
cols = ['O_TIME' ,'O_SUS' ,'O_EXP' ,'O_INF' ,'O_REM' ,'O_HOS' ,'O_HOSCUM' ,'O_ICU' ,'O_ICUCUM' ,'O_REC' ,'O_DEAD' ,'O_CUMINF' ,'O_ALPHARUN']
df.columns = cols
Thanks
NCR_10_May_best.txt<https://github.com/TNO/Covid-SEIR/files/6456902/NCR_10_May_best.txt>
input_file_10_May_july_onwards_final.txt<https://github.com/TNO/Covid-SEIR/files/6456906/input_file_10_May_july_onwards_final.txt>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2XGK3NIBDSSG4CIKHYBVDTNDFGFANCNFSM44JCTUAA>.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
{
"worldfile": false,
"country": "../res/input_file_10_May_july_onwards_final.txt",
"startdate": "07/02/20",
"t_max" : 460,
"dt" : 0.1,
"time_delay": 27,
"population": 13e6,
"nr_prior_samples": 500,
"nr_forecast_samples": 2500,
"esmda_iterations": 8,
"esmda_ignoredays": 100,
"N" : {
"type": "uniform",
"min": 50000,
"max": 300000
},
"sigma" : 0.2,
"gamma" : 0.5 ,
"R0" : {
"type": "normal",
"mean": 3.2,
"stddev": 0.0
},
"m": 0.90,
"alpha" : [[0.6, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.7, 1.0]],
"dayalpha" : [1, 122, 152, 183, 214, 242, 270],
"c_alpha" : [[0.75, 0.95],[0.75, 0.95],[0.6, 0.74],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.6, 0.74],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.75, 0.95]],
"c_dayalpha" : [1, 47, 62, 78, 92, 108, 123, 142, 157, 170, 200, 231, 261, 292, 323, 351, 379],
"delayHOS" : {
"type": "uniform",
"min": 9,
"max": 9
},
"delayHOSREC" : {
"type": "uniform",
"min": 7,
"max": 20,
"smooth_sd": 7
},
"delayHOSD" : {
"type": "uniform",
"min": 1,
"max": 4
},
"delayREC" : 12,
"delayICUCAND": {
"type": "uniform",
"min": 0,
"max": 0,
"smooth_sd": 2
},
"delayICUD": {
"type": "uniform",
"min": 7,
"max": 7,
"smooth_sd": 3
},
"delayICUREC": {
"type": "uniform",
"min": 26,
"max": 34,
"smooth_sd": 20
},
"c_hosfrac" : 0.05,
"hosfrac": {
"type":"normal",
"mean": 0.05,
"stddev": 0.05
},
"dfrac" : 0.1,
"icudfrac" : 0.3,
"c_ICufrac": 0.1,
"ICufrac": {
"type":"normal",
"mean": 0.1,
"stddev": 0.03
},
"calibration_mode": [1,5, 6],
"observation_error": [100000,50, 50],
"YMAX": 200e3,
"XMAX": 360,
"hist_time_steps": [30,35,40,60],
"p_values": [0.05, 0.3, 0.5, 0.7, 0.95],
"plot" : {
"legendloc" : "best",
"legendfont" : "x-small",
"y_axis_log": false,
"hindcast_plume": true,
"xmaxalpha": 360,
"casename": "India-NCR"
}
}
|
Dear Sarang,
In extension to my mail of last night I think I found a way to solve largely the fitting issue for the starting data.
You need to add one line of code in bin/corona_esmda.py at line 404:
dayr = max(dayr,1)
After this change you can use the attached input file (which contains the alpha and dayalpha values you have sent me yesterday).
The essence of fitting the first data is to set the the day_alpha of the first step to a negative number (i.e. -20) such that the step’s alpha is applied before the data starts and the convolution with treatment times allows to reproduce the first data points. To make it work you also need to put the timedelay to a sufficienty large number (“time_delay”: 40)
***@***.***D74700.6CABF5E0]
***@***.***D74700.6CABF5E0]
From: sarang-kharpate ***@***.***>
Sent: Tuesday, May 11, 2021 8:30 AM
To: TNO/Covid-SEIR ***@***.***>
Cc: Wees, J.D.A.M. (Jan Diederik) van ***@***.***>; Comment ***@***.***>
Subject: Re: [TNO/Covid-SEIR] Getting close to zero forecast values in prediction. (#3)
Hello Jan-Diederik,
Thanks for the guidance. With your help in tuning parameter files along with input file changes we are able to get pretty good fit and projection for Hospitalized and ICU values. The code is mimicking the trend pretty closely. I have attached new input file and latest configuration files. I do have few more questions for you
1. We are still getting very high values for infected predictions( P0.095 and observed for file NCR_10_May_best_posterior_prob_infected_calibrated_on_[5, 6].csv),
and when we try to optimize parameter for infection related changes ( e.g. m, R0, sigma, gamma values) our hospital prediction also get changes.
2. When we try to use calibration mode as [1, 5, 6] code errors out like
(numpy.linalg.LinAlgError: Singular matrix error)
even if we use [1] only it still gets errors out. But it runs smoothly for [5, 6] calibration mode. Am I putting something wrong in any parameters?
1. This code generates .h5 file in output folder. If I explore .h5 file I can see model and posterior sub sections in h5 file. I think columns are forecasted values for time, susceptible, exposed, infected, remove, hospital, hospital cumulative, ICU, ICU cumulative, recovered ,dead and alpha run. All predicted by model.
Is my interpretation correct for 13 columns present in file?
df = pd.DataFrame(hf['model']['posterior'][0]).T
cols = ['O_TIME' ,'O_SUS' ,'O_EXP' ,'O_INF' ,'O_REM' ,'O_HOS' ,'O_HOSCUM' ,'O_ICU' ,'O_ICUCUM' ,'O_REC' ,'O_DEAD' ,'O_CUMINF' ,'O_ALPHARUN']
df.columns = cols
Thanks
NCR_10_May_best.txt<https://github.com/TNO/Covid-SEIR/files/6456902/NCR_10_May_best.txt>
input_file_10_May_july_onwards_final.txt<https://github.com/TNO/Covid-SEIR/files/6456906/input_file_10_May_july_onwards_final.txt>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2XGK3NIBDSSG4CIKHYBVDTNDFGFANCNFSM44JCTUAA>.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
{
"worldfile": false,
"country": "../res/input_file_10_May_july_onwards_final.txt",
"startdate": "07/02/20",
"t_max" : 460,
"dt" : 0.1,
"time_delay": 40,
"population": 13e6,
"nr_prior_samples": 200,
"nr_forecast_samples": 2500,
"esmda_iterations": 8,
"esmda_ignoredays": 0,
"N" : {
"type": "uniform",
"min": 50000,
"max": 300000
},
"sigma" : 0.2,
"gamma" : 0.5 ,
"R0" : {
"type": "normal",
"mean": 3.2,
"stddev": 0.0
},
"m": 0.90,
"alpha" : [[0.2, 0.8],
[0.2, 0.8],
[0.5, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.7, 1.0]],
"dayalpha" : [-20, 14, 33, 48, 61, 91, 122, 152, 183, 214, 242, 270],
"c_alpha" : [[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.2, 0.8],
[0.7, 1.0]],
"c_dayalpha" : [-20, 122, 152, 183, 214, 242, 270],
"c_alpha" : [[0.75, 0.95],[0.75, 0.95],[0.6, 0.74],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.6, 0.74],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.1, 0.59],[0.75, 0.95]],
"c_dayalpha" : [1, 47, 62, 78, 92, 108, 123, 142, 157, 170, 200, 231, 261, 292, 323, 351, 379],
"delayHOS" : {
"type": "uniform",
"min": 9,
"max": 9
},
"delayHOSREC" : {
"type": "uniform",
"min": 7,
"max": 20,
"smooth_sd": 7
},
"delayHOSD" : {
"type": "uniform",
"min": 1,
"max": 4
},
"delayREC" : 12,
"delayICUCAND": {
"type": "uniform",
"min": 0,
"max": 0,
"smooth_sd": 2
},
"delayICUD": {
"type": "uniform",
"min": 7,
"max": 7,
"smooth_sd": 3
},
"delayICUREC": {
"type": "uniform",
"min": 26,
"max": 34,
"smooth_sd": 20
},
"c_hosfrac" : 0.05,
"hosfrac": {
"type":"normal",
"mean": 0.05,
"stddev": 0.05
},
"dfrac" : 0.1,
"icudfrac" : 0.3,
"c_ICufrac": 0.1,
"ICufrac": {
"type":"normal",
"mean": 0.1,
"stddev": 0.03
},
"calibration_mode": [1,5, 6],
"observation_error": [100000,50, 50],
"YMAX": 200e3,
"XMAX": 360,
"hist_time_steps": [30,35,40,60],
"p_values": [0.05, 0.3, 0.5, 0.7, 0.95],
"plot" : {
"legendloc" : "best",
"legendfont" : "x-small",
"y_axis_log": false,
"hindcast_plume": true,
"xmaxalpha": 360,
"casename": "India-NCR"
}
}
|
Hello Jan-Diederik, Thanks a lot for you quick and prompt reply, because of this we have progressed so much in our work. I am attaching our final inputs and configuration files for which we are getting best fits. We have finalized on 3 configuration files (infections, Hospitalized and ICU). I just want to understand one logic. When we calculate values for writing back to csv files (0.05, 0.25,...0.95) we sort the values and then take (length of file * confidence interval) and then take that index position values from array and write it back. Basically I just want to understand below logic.
Definitely there must be some thought behind this step, I am not able to understand it. Also what if I take last value of last iteration array? Last value of posterior as final my final output. Thanks and Regards, input_file_13_May.txt |
Hello Sarang,
The posterior_curves data are taken on a day by day basis (post_day) starting after time-delay (t_ind). The post_day values are sorted in array_sorted and then you pick for each day the index corresponding to the p value. If posterior_length=250 (this corresponds to the number of "nr_prior_samples": 250), and the outcome values have been sorted, the p=0.5 corresponds to index 125.
I hope that helps, and I am very glad to hear this all helps in progressing on your work.
One further thing what crossed my mind when looking at the models. Initially in the WHO paper we assumed hosfrac close to 0.05 but later we adjusted this to lower values for the Netherlands to ca 0.015 based on percentage of people with antibodies of blood donors.
I guess in your case in reality the number of infected and people with antibodies may have accumulated to a 10 fold higher value than registered (if you assume hosfrac of about 0.01). This number I guess is still relatively high for the relatively young population in India compared to the Netherlands. Including a low hosfrac may give rise to herd immunity and assist in brining down the future spread significantly
I guess you may also have noticed that the convolution of infected with treatment times is done with a gamma/ (lognormal) function, which is more realistic and behaves better than gaussian smoothing (as it avoids negative treatment times). These are also explained with best fit parameters in the Netherlands in this manuscript:
Performance of progressive and adaptive COVID-19 exit strategies: a stress test analysis for managing intensive care unit rates (medrxiv.org)<https://www.medrxiv.org/content/medrxiv/early/2020/05/20/2020.05.16.20102947.full.pdf>
Kind regards,
Jan-Diederik
From: sarang-kharpate ***@***.***>
Sent: Thursday, May 13, 2021 5:54 PM
To: TNO/Covid-SEIR ***@***.***>
Cc: Wees, J.D.A.M. (Jan Diederik) van ***@***.***>; Comment ***@***.***>
Subject: Re: [TNO/Covid-SEIR] Getting close to zero forecast values in prediction. (#3)
Hello Jan-Diederik,
Thanks a lot for you quick and prompt reply, because of this we have progressed so much in our work. I am attaching our final inputs and configuration files for which we are getting best fits. We have finalized on 3 configuration files (infections, Hospitalized and ICU).
I just want to understand one logic. When we calculate values for writing back to csv files (0.05, 0.25,...0.95) we sort the values and then take (length of file * confidence interval) and then take that index position values from array and write it back.
Basically I just want to understand below logic.
for post_day in posterior_curves[t_ind, :]:
array_sorted = np.sort(post_day)
p_array.append([array_sorted[int(posterior_length * p)] for p in p_values])
Definitely there must be some thought behind this step, I am not able to understand it. Also what if I take last value of last iteration array? Last value of posterior as final my final output.
Thanks and Regards,
Sarang Kharpate
input_file_13_May.txt<https://github.com/TNO/Covid-SEIR/files/6473577/input_file_13_May.txt>
Best_Infected.txt<https://github.com/TNO/Covid-SEIR/files/6473587/Best_Infected.txt>
best_hospital.txt<https://github.com/TNO/Covid-SEIR/files/6473588/best_hospital.txt>
Best_ICU.txt<https://github.com/TNO/Covid-SEIR/files/6473589/Best_ICU.txt>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2XGK3VBINWVJ2EXQA2ALTTNPY2DANCNFSM44JCTUAA>.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
|
Hello Jan-Diederik,
I am trying to utilize this model for my NCR region (where total population size is mostly 13 million). I have used your netherlands_april9_narrow.json as a reference and corona_esmda.py as a modelling technique.
In terms of parameters for my NCR regions I have changed the following parameters.
"t_max" : 350,
"population": 13e6,
"alpha" : [[0.1,0.5],[0.1,0.5],[0.6,0.8],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.1,0.5],[0.8,1.0]],
"dayalpha" : [1, 14, 33, 48, 61, 91, 122, 152, 183, 214, 242, 270],
"xmaxalpha": 280,
All the others numbers were unchanged. When I ran this with above parameters, the forecasted values I mostly got were close to zero for P5,P25,P50,P75,P90 in all the output file (e.g. posterior_prob_hospitalizedcum_calibrated_on_hospitalizedcum, ICU_calibrated_on_hospitalizedcum, infected_calibrated_on_hospitalizedcum etc.)
I have also attached the data and the changed parameter file that I have used for your reference.
Need your help and suggestion on the same and also wanted to know if we want to replicate this for any other region, what changes we need to incorporate in parameters to get a good forecast and what is the rationally behind changing the parameters.
I have attached my configuration file and input file as well.
NCR_7_May.txt
input_file_7_May.txt
input_file_icufrac_7_May.txt
Thanks
The text was updated successfully, but these errors were encountered: