Closed claudiofronterre closed 4 years ago
@claudiofronterre fast moving model-building, I'm afraid! The interface to CovidUKODE has changed due to increasing bits of data. Changes merged into master in dcc463bd.
"""Represents a CovidUK ODE model
:param M_tt: a MxM matrix of age group mixing in term time
:param M_hh: a MxM matrix of age group mixing in holiday time
:param W: Commuting volume
:param C: a n_ladsxn_lads matrix of inter-LAD commuting
:param N: a vector of population sizes in each LAD
:param date_range: a time range [start, end)
:param holidays: a list of length-2 tuples containing dates of holidays
:param lockdown: a length-2 tuple of start and end of lockdown measures
:param time_step: a time step to use in the discrete time simulation
"""
Be aware also that the CovidUKODE model now inherits from CovidUK (there's a stochastic version of the model in the brewing).
I am using the reticulate package that allows you call Python from R. This is how the first part of
covid_ode.py
looks like in R:Note that it won't run because there are no
start
andend
settings in theode_config.yaml
.A function like
mcmc.py
can be run from R as simply as:It would be useful to have a chat to know what arguments would you like to have in a R wrapper for each of the main functions.