Linear Gaussian Bayesian network manipulations
General functions to generate, transform, display general and
particular linear Gaussian Bayesian networks [/nbn/] are provided.
Specific /nbn/ are chain and crossed /nbn/s. Focus is given in getting joint and conditional probability distributions of the set of nodes.
rbmn stands for R'eseau Bay'esien MultiNormal.
Some basic concepts:
chain /nbn/s are /nbn/s where all nodes are connected with two other nodes, except the two ending nodes of the chain having only one connection. (This is not the usual terminology in graphical models but I didn't find a more appropriate word: suggestions are welcome.)
crossed /nbn/s are /nbn/s having the node set defined as a Cartesian product of two series of items, and a DAG based on this structure. See the
crossed4nbn1nbnfunction and/or Tian (2013) for details.
An adjacency matrix is a matrix equivalent to the DAG associated to a /nbn/. Its rows as well as its columns are associated to the set of nodes. The
(i,j)cell is one when there is an arc going from node
jand zero otherwise.
Three equivalent ways can be used to represent the joint probability distribution of a set of nodes respectively associated to the structures /mn/, /nbn/ and /gema/:
/mn/ (for multivariate normal) is just the list of the expectation (
$mu) and the variance matrix (
/nbn/ (for normal Bayesian network) is a simple list, a component a node described with a list. The names are node names and each list associated to a node provides the conditional expectation and variance, the parent (if any) and the associated regression coefficients.
/gema/ (for generating matrices) is a list of a vector (
mu) and a matrix (
li) such that the vector of the nodes can be defined by
X = mu + li%*%Ewhere
Eis a normal random vector with expectation zero and variance matrix unity.
It is planned to add a fourth one under the name of /gbn/.
To relieve the memory effort, most names of the functions have been given a two (or more) components structure separated with a figure. This idea will be explained and exploited in a package to come named documair. The approximate meaning of the figures are:
0 (similar to 'o')
rbmn0chain.01to indicate an object example provided by rbmn.
1 (similar to an ~ and) ??? to link different objects or actions
train1carfor train and car.
2 (as usual but only one-to-one)
nbn2gemameans \"transforming a /nbn/ into a /gema/ objects\".
3 (remind the 'belong to' sign)
form3repeatcould be interpreted as "repeat action from the series of 'form' functions".
4 (associated to 'from')
adja4nbnmeans "get the adjacency matrix from a /nbn/ object".
7 (upper bar of '7' similar to the hyphen)
arc7nb4nbnmeans "get the arc-numbers from a /nbn/".
8 (similar to 'a')
print8nbnfor \"generating or printing a /nbn/ object\".
A number of ancillary functions have not been exported to give a better
access to the main function of /rbmn/. Nevertheless they are available
../rbmn/R/ directory, and with all their comments
Rd files into
directory). Some of them are visible when defining the default
arguments of some functions.
Projected evolution of /mn/
Generalize the /mn/ object with a regression part like the output of function
pouris not of length zero and argument
x2is not null. With such a structure, every node of a /nbn/ could be described with a /mn/ comprising a unique variable... Also the two arguments of function
mn4joint1condiwould be just two /mn/ objects... This is also the generalized /mn/ proposed in function
simulate8gmnunder the argument of
loi... Of course almost all functions dealing with /nbn/ objects will be to rewrite!
Introduce a new object
gbnfor Gaussian Bayesian network similar to the list provided by function
TO DO list
Systemize the existence of
Introduce their systematic use conditionned with a
Follow the main checking of every functions
Give (and use) class attributes to the main objects.
Introduce the main objects in this short presentation.
Make a true small example in this short presentation.
Make the function
Add the computation made with /bnlearn/ in the example of
Check the topological order within
Make a super transformation function from an object associated to a Bayesian network to any other type, including itself.
Check the topological order in
Think about removing all
rmatrixtransformations to the benefit of the to-come
Introduce a check of non-negativity of
Add examples to all functions without any.
MIAj - Inra - Jouy-en-Josas
Maintainer: Jean-Baptiste Denis Jean-Baptiste.Denis@Jouy.Inra.Fr
(A technical report presenting the concepts used in rbmn is under redaction; it can be obtained as it is if asked.)
Scutari M (2010). "Learning Bayesian Networks with the bnlearn R Package". Journal of Statistical Software, 35(3), 1-22. URL http://www.jstatsoft.org/v35/i03/.
Tian S, Scutari M & Denis J-B (2013, submitted to JSFdS). "Predicting with Crossed Linear Gaussian Bayesian Networks".
1 2 3 4 5