neherlab / covid19_scenarios

Models of COVID-19 outbreak trajectories and hospital demand
https://covid19-scenarios.org
MIT License
1.36k stars 354 forks source link

Feat/deterministic mean sims #720

Closed rneher closed 4 years ago

rneher commented 4 years ago

Related issues and PRs

714

Description

this PR makes the median trajectory deterministic which should be less surprising behavior. From the updates.md:

Several users were surprised that the median curve is quite variable from run to run despite the parameter inputs being deterministic. The underlying reason for this behavior is that the app samples parameters from the parameter ranges and plots the median of this often small sample. Since these parameters affect exponential growth, small variation in the sample can result in large variation in the output. We now generate an additional trajectory where each parameter is set to its median value. This trajectory should behave like the median trajectory in a large sample and is plotted instead of the sample median.

Impacted Areas in the application

algorithm and inititialization.

Testing

check behavior of the model for various locales.

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/covid19-scenarios/covid19-scenarios/8qksf6vw3 ✅ Preview: https://covid19-scenarios-git-feat-deterministicmeansims.covid19-scenarios.now.sh

codecov[bot] commented 4 years ago

Codecov Report

Merging #720 into master will increase coverage by 0.28%. The diff coverage is 19.14%.

@@            Coverage Diff             @@
##           master     #720      +/-   ##
==========================================
+ Coverage   24.53%   24.81%   +0.28%     
==========================================
  Files         135      135              
  Lines        2902     2913      +11     
  Branches      388      396       +8     
==========================================
+ Hits          712      723      +11     
  Misses       2190     2190              
Impacted Files Coverage Δ
src/algorithms/run.ts 0.00% <0.00%> (ø)
src/algorithms/initialize.ts 90.27% <45.45%> (+2.95%) :arrow_up:
src/algorithms/mitigation.ts 69.81% <100.00%> (-1.10%) :arrow_down:
src/algorithms/utils/sample.ts 100.00% <0.00%> (+100.00%) :arrow_up:
codeclimate[bot] commented 4 years ago

Code Climate has analyzed commit 53e18156 and detected 0 issues on this pull request.

View more on Code Climate.