Maud’s data model¶
The main job of Maud’s data model is to define an object called
MaudInput which represents in Python all the information provided by the
user, and holds the information that is passed to Stan. It extensively uses
Code implementing Maud’s data model is in the folder src/maud/data_model.
The information provided by the users consists of:
Configuration represented as a
A kinetic model represented by a
Priors represented by a
Measurements represented by a
Initial parameter values represented by an optional pandas
On initialisation a
MaudInput performs the following steps:
Stan variables are inferred from the kinetic model and measurements, creating a
User-specified priors are supplemented with defaults to create a
StanVariableSetis required at this stage in order to ensure correct shapes.
A full set of initial values is created using prior means as defaults.
Stan inputs for the train and test models are created as
MaudConfig is a simple python representation for the user toml input and specifies defaults for the non-obligatory fields.
class validates the user toml input and supplements it with attributes
UserPriorInput is a thin container for the user-provided prior files.
MeasurementSet contains user-provided measurement and experimental setup information.
StanVariableSet specifies which parameters appear in Maud’s statistical model, and provides structural information about each parameter, such as its shape, default location and scale and composition of its ids.
PriorSet specifies what kind of prior each parameter should have. The options are independent 1d, independent 2d or multivariate 1d.
StanInputTrain and StanInputTest specify what data can possibly go into Maud’s Stan input dictionaries, performs validation and sets out what these dictionaries should look like.