- formula
A formula describing the model to be fit. The formula
should be additive. The network will figure out any interactions or
nonlinearities.
- hidden.layers
A list of objects created by HiddenLayer defining the
network structure. The input layer is determined by the
formula argument. The terminal layer is a linear regression
on the outputs of the final hidden layer.
- niter
The number of MCMC iterations to run. Be sure to include enough so
you can throw away a burn-in set.
- data
An optional data frame, list or environment (or object coercible by
'as.data.frame' to a data frame) containing the variables in the
model. If not found in 'data', the variables are taken from
'environment(formula)', typically the environment from which
BayesNnet is called.
- subset
an optional vector specifying a subset of observations to be used in
the fitting process.
- prior
When passed to BayesNnet this is the prior
distribution for the terminal layer, which must be an object of
class SpikeSlabPrior,
SpikeSlabPriorDirect, or NULL. If NULL
then a default prior will be used.
When passed to HiddenLayer this is the prior distribution for
the coefficients to that layer. The prior is specified for a single
output node, and the same prior is used for all nodes. You can
think of each hidden layer output node as a logistic regression
model where the predictors are the outputs of the previous layer.
This must be an object of class MvnPrior,
SpikeSlabGlmPrior, or
SpikeSlabGlmPriorDirect.
- expected.model.size
When prior is not specified a default spike-and-slab prior
will be used. The expected.model.size argument to
BayesNnet is passed to
SpikeSlabPriorDirect. In HiddenLayer the
argument is passed to SpikeSlabGlmPriorDirect.
The parameter is used to set the prior inclusion probabilities for
the coefficients. If p coefficients are available then the
prior inclusion probabilities are each set to
expected.model.size / p. If this ratio exceeds 1 then model
selection is turned off and all coefficients are included.
- drop.unused.levels
Logical indicating whether unobserved factor
levels should be dropped when forming the model matrix.
- contrasts
An optional list. See the contrasts.arg
argument of model.matrix.default.
- ping
The frequency with which to print status update messages
to the screen. For example, if ping == 10 then an update
will be printed every 10 MCMC iterations.
- seed
An integer to use as the random seed for the underlying
C++ code. If NULL then the seed will be set using the
clock.
- number.of.nodes
The number of nodes in this hidden layer. This
must be a positive scalar integer.