Description Usage Arguments Value See Also
Create a MCMC sampler for Bayesian Networks. The sampler samples Bayesian Networks (ie models).
1 2 3 4 5 6 7 8 | BNGibbsSampler(data, initial = empty(ncol(data) - 1),
prior = NULL, return = "network",
logScoreFUN = logScoreMultDirFUN(),
logScoreParameters = list(hyperparameters = "bdeu"),
constraint = NULL, statistics = list(nEdges = nEdges),
maxNumberParents = NULL, moveprobs = c(0, 0, 1, 0),
verbose = F, keepTape = F, parentsTables = NULL,
scoresParents = NULL)
|
data |
The data. |
initial |
An object of class 'bn'. The starting value of the MCMC. |
prior |
A list of functions of the same length as
|
return |
Either "network" or "contingency". |
logScoreFUN |
A list of four elements:
For
Multinomial-Dirichlet models,
|
logScoreParameters |
A list of parameters that are passed to logScoreFUN. |
constraint |
A matrix of dimension ncol(data) x ncol(data) giving constraints to the sample space. The (i, j) element is 1 if the edge i -> j is required -1 if the edge i -> is excluded. 0 if the edge i -> j is not constrained. The diagonal of constraint must be all 0. |
statistics |
A named list of functions which should
be applied to the current network after each step. Each
function should accept an object of class |
maxNumberParents |
Integer of length 1. The maximum
number of parents of any node. A |
moveprobs |
A numeric vector of length 3. Specifies the probability that moves updating the parent sets of 1, 2 and 3 nodes simultaneously. Must sum to 1. |
verbose |
A logical of length 1, indicating whether verbose output should be printed. |
keepTape |
A logical of length 1, indicating whether a full log ('tape') of the MCMC sampler should be kept. Enabling this option can be very memory-intensive. |
parentsTables |
A list of tables of the form
returned by |
scoresParents |
A list of the form returned by
|
A function, which when called draws the next sample of the MCMC.
BNSampler, BNSamplerBigFlips,
BNSamplerPT, BNSamplerMJ,
BNSamplerGrzeg. Internally uses
samplePair and sampleNode.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.