daveselinger / covid_rapid_test_simulation2

An update to our original rapid test simulation.
MIT License
0 stars 1 forks source link

Initialization of simulation is doing random sampling with replacement #22

Closed tedkyi closed 2 years ago

tedkyi commented 2 years ago

The code that does things like pick the starting people that are infected, it is calling random.random() over the entire population every time. This is random sampling with replacement, and means that we can get duplicates. Because of this, we may not be getting as many unique people as we are supposed to.

tedkyi commented 2 years ago

Second commit to PR #21 has fixed this, using random.sample() to do sampling without replacement.

tedkyi commented 2 years ago

Closing this with the merge of PR #21.