From ef7080e4bd06494372377bc669b2ba84a12d409b Mon Sep 17 00:00:00 2001 From: markus Date: Thu, 11 Feb 2021 17:15:59 +0100 Subject: [PATCH] usage example --- cara/montecarlo.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index 3d63c2f9..fde8548b 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -669,10 +669,12 @@ exposure_models = [MCExposureModel( ) ) for e in (False, True)] +plot_pi_vs_viral_load(exposure_models, labels=['Without masks', 'With masks']) -plot_pi_vs_viral_load(exposure_models[0]) -for model in exposure_models: - present_model(model.concentration_model) - plt.hist(model.infection_probability(), bins=200) - plt.xlabel('Percentage probability of infection') - plt.show() +# for model in exposure_models: +# present_model(model.concentration_model, title=f'Model summary - {"English" if model.concentration_model.infected.english_variant else "Original"} variant') +# plt.hist(model.infection_probability(), bins=200) +# plt.xlabel('Percentage probability of infection') +# plt.title(f'Probability of infection in baseline case - {"English" if model.concentration_model.infected.english_variant else "Original"} variant') +# plt.yticks([], []) +# plt.show()