Warning
Important: This is the documentation of code no longer in active development. This is the link to the current docs: covid19-inference
Plotting¶
-
covid19_inference.plotting.
plot_cases
(trace, new_cases_obs, date_begin_sim, diff_data_sim, start_date_plot=None, end_date_plot=None, ylim=None, week_interval=None, colors=('tab:blue', 'tab:orange'), country='Germany')[source]¶ Plots the new cases, the fit, forecast and lambda_t evolution
Parameters: - trace (trace returned by model) –
- new_cases_obs (array) –
- date_begin_sim (datetime.datetime) –
- diff_data_sim (float) – Difference in days between the begin of the simulation and the data
- start_date_plot (datetime.datetime) –
- end_date_plot (datetime.datetime) –
- ylim (float) – the maximal y value to be plotted
- week_interval (int) – the interval in weeks of the y ticks
- colors (list with 2 colornames) –
Returns: figure, axes
-
covid19_inference.plotting.
plot_hist
(model, trace, ax, varname, colors=('tab:blue', 'tab:orange'), bins=50)[source]¶ Plots one histogram of the prior and posterior distribution of the variable varname.
Parameters: - model (pm.Model instance) –
- trace (trace of the model) –
- ax (matplotlib.axes instance) –
- varname (string) –
- colors (list with 2 colornames) –
- bins (number or array) – passed to np.hist
Returns: None