bn class {bnlearn} | R Documentation |
The structure of an object of the bn
S3 class.
An object of class bn
is a list containing at least the
following components:
learning
: a list containing some information about
the results of the learning algorithm. It's never changed
afterward.
arcs
: the arcs of the Bayesian network (a two-column
matrix, whose columns are labeled from
and to
).
Undirected arcs are stored as two directed arcs with opposite
directions between the corresponding incident nodes.
whitelist
: a sanitized copy of the whitelist
parameter (a two-column matrix, whose columns are labeled
from
and to
).
blacklist
: a sanitized copy of the blacklist
parameter (a two-column matrix, whose columns are labeled
from
and to
).
test
: the label of the conditional independence test
used by the learning algorithm (a character string). The
label of the network score is used for score-based algorithms,
and "none" for randomly generated graphs.
ntests
: the number of conditional independence tests
used in the learning (an integer value).
algo
: the label of the algorithm used in the learning
process (a character string), or "random/generated" for randomly
generated or empty networks.
args
: a list. The values of the parameters of
either the conditional tests or the scores used in the learning
process. Only the relevant ones are stored, so this may be
an empty list.
alpha
: the target nominal type I error rate (a
numeric value) of the conditional independence tests.
iss
: a positive numeric value, the imaginary
sample size used by the bge
and bde
scores.
phi
: a character string, either heckerman
or bottcher
; used by the bge
score.
k
: a positive numeric value, the penalty per
parameter used by the aic
and bic
scores.
prob
: the probability of each arc to be present in
a graph generated by the ordered
graph generation algorithm.
burn.in
: the number of iterations for the ic-dag
graph generation algorithm to converge to a stationary (and uniform)
probability distribution.
max.degree
: the maximum degree for any node in a graph
generated by the ic-dag
graph generation algorithm.
max.in.degree
: the maximum in-degree for any node in
a graph generated by the ic-dag
graph generation algorithm.
max.out.degree
: the maximum out-degree for any node in
a graph generated by the ic-dag
graph generation algorithm.
nodes
: a list. Each element is named after a node
and contains the following elements:
mb
: the Markov blanket of the node (a vector of
character strings).
nbr
: the neighbourhood of the node (a vector of
character strings).
parents
: the parents of the node (a vector of
character strings).
children
: the children of the node (a vector of
character strings).
arcs
: the arcs of the Bayesian network (a two-column
matrix, whose columns are labeled from
and to
).
Undirected arcs are stored as two directed arcs with opposite
directions between the corresponding incident nodes.
Marco Scutari