Updated probability of infection values on tests

This commit is contained in:
Luis Aleixo 2021-10-05 15:57:18 +02:00
parent 1feec5a050
commit 2c3b267af0
2 changed files with 22 additions and 22 deletions

View file

@ -74,23 +74,23 @@ def known_concentrations(func):
@pytest.mark.parametrize(
"population, cm, f_dep, expected_exposure, expected_probability", [
[populations[1], known_concentrations(lambda t: 36.), 1.,
np.array([432, 432]), np.array([99.6803184113, 99.5181053773])],
"population, cm, expected_exposure, expected_probability", [
[populations[1], known_concentrations(lambda t: 36.),
np.array([432, 432]), np.array([77.2191556943, 74.6803506895])],
[populations[2], known_concentrations(lambda t: 36.), 1.,
np.array([432, 432]), np.array([97.4574432074, 98.3493482895])],
[populations[2], known_concentrations(lambda t: 36.),
np.array([432, 432]), np.array([61.1470214407, 65.2366759251])],
[populations[0], known_concentrations(lambda t: np.array([36., 72.])), 1.,
np.array([432, 864]), np.array([98.3493482895, 99.9727534893])],
[populations[0], known_concentrations(lambda t: np.array([36., 72.])),
np.array([432, 864]), np.array([65.2366759251, 87.9151129926])],
[populations[1], known_concentrations(lambda t: np.array([36., 72.])), 1.,
np.array([432, 864]), np.array([99.6803184113, 99.9976777757])],
[populations[1], known_concentrations(lambda t: np.array([36., 72.])),
np.array([432, 864]), np.array([77.2191556943, 93.589153588])],
[populations[0], known_concentrations(lambda t: 72.), np.array([0.5, 1.]),
864, np.array([98.3493482895, 99.9727534893])],
[populations[2], known_concentrations(lambda t: np.array([36., 72.])),
np.array([432, 864]), np.array([61.1470214407, 87.9151129926])],
])
def test_exposure_model_ndarray(population, cm, f_dep,
def test_exposure_model_ndarray(population, cm,
expected_exposure, expected_probability):
model = ExposureModel(cm, population)
np.testing.assert_almost_equal(

View file

@ -249,12 +249,12 @@ def skagit_chorale_mc():
@pytest.mark.parametrize(
"mc_model, expected_pi, expected_new_cases, expected_dose, expected_ER",
[
["shared_office_mc", 10.7, 0.32, 57.24, 654],
["classroom_mc", 36.1, 6.85, 780.0, 28464],
["ski_cabin_mc", 16.3, 0.49, 35.94, 7404],
["gym_mc", 2.25, 0.63, 0.7842, 1968],
["waiting_room_mc", 9.72, 1.36, 34.26, 3534],
["skagit_chorale_mc",29.9, 17.9, 190.0, 141400],
["shared_office_mc", 2.3, 0.32, 57.24, 654],
["classroom_mc", 16.1, 6.85, 780.0, 28464],
["ski_cabin_mc", 4.4, 0.49, 35.94, 7404],
["gym_mc", 0.57, 0.63, 0.7842, 1968],
["waiting_room_mc", 2.02, 1.36, 34.26, 3534],
["skagit_chorale_mc",11.42, 17.9, 190.0, 141400],
]
)
def test_report_models(mc_model, expected_pi, expected_new_cases,
@ -275,10 +275,10 @@ def test_report_models(mc_model, expected_pi, expected_new_cases,
@pytest.mark.parametrize(
"mask_type, month, expected_pi, expected_dose, expected_ER",
[
["No mask", "Jul", 30.0, 405.84, 3894],
["Type I", "Jul", 10.2, 73.38, 702],
["FFP2", "Jul", 4.0, 73.38, 702],
["Type I", "Feb", 4.25, 21.42, 702],
["No mask", "Jul", 11.68, 405.84, 3894],
["Type I", "Jul", 2.12, 73.38, 702],
["FFP2", "Jul", 0.66, 73.38, 702],
["Type I", "Feb", 0.73, 21.42, 702],
],
)
def test_small_shared_office_Geneva(mask_type, month, expected_pi,