Welcome to BayesCMD’s documentation!

BayesCMD is a package intended to expand the capabilities of the Brain/Circulation Modelling (BCMD) framework. It introduces the ability to obtain posterior distributions for model parameters by using Approximate Bayesian Computation (ABC).

bcmdModel

Running the BCMD Model

The BCMD model can be run in a number of ways, both using the command lines and the WeBCMD interface. Over time, both the BayesCMD package and the WeBCMD package are expected to merge. As a result, the BCMD model class has been designed to allow flexibility and compatibility with both the current BayesCMD framework and the WeBCMD framework.

bcmd_model

Input Creation

Input files are required by the BCMD model. A special class has been created that will create a correctly formatted input file for a variety of use cases.

input_creation

Create input files for use with a BCMD model.

Input files are needed in order to set model parameters and provide driving inputs.

abc

The abc subpackage is used to handle the Approximate Bayesian Computation (ABC) specific components of BayesCMD. This includes running the model multiple times in a batch process, calculating distances between datasets and generating priors for parameters.

Distances

jsonParsing

Miscellaneous

Here you will find a number of useful functions that are used throughout the general BayesCMD package.

Utility Functions

Miscellaneous utility functions used throughout BayesCMD.

This module contains a number of utility functions that are used throughout the different BayesCMD subpackages.

bayescmd.util.findBaseDir(basename, max_depth=5, verbose=False)[source]

Get relative path to a BASEDIR. :param basename: Name of the basedir to path to :type basename: str

Returns:Relative path to base directory.
Return type:StringIO
bayescmd.util.round_sig(x, sig=1)[source]

Round a value to N sig fig.

Parameters:
  • x (float) – Value to round
  • sig (int, optional) – Number of sig figs, default is 1
Returns:

Rounded value

Return type:

float

Processing Results

Indices and tables