| HeatBath | R Documentation |
Generates samples of binary state vectors using heat-bath updates under
an extended maximum pairwise entropy model parameterized
by implicit environmental parameters h and interaction matrix J.
Optionally includes environmental effects g, in which case an environmental
matrix is generated internally.
HeatBath(steps, nproc, h, J, g = NULL)
steps |
Integer. Number of heat-bath iterations to run. |
nproc |
Integer. Number of parallel samples (rows) to maintain. |
h |
Numeric vector of length |
J |
Numeric matrix of size |
g |
Optional numeric matrix of size |
A list with components:
Numeric matrix (nproc x nn) of sampled states (0/1).
Numeric matrix (nproc x ne) of environmental values, or NULL
if g is NULL.
set.seed(1)
nn <- 5
pars <- hb.paramgen(nn)
res <- HeatBath(steps = 10, nproc = 8, h = pars[[1]], J = pars[[2]])
str(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.