Proposed design for gR, a graphical models toolkit for R
Kevin P. Murphy
www.ai.mit.edu/∼murphyk
29 September 2003
Contents
1 Introduction 2
1.1 Comparison of proposed design with existing software . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Graphical model communities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Summary of proposed design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Representation 4
2.1 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Class or structure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.2 Kinds of graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.3 GUIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.4 Graph visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.5 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.6 Creating the graph via an API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.7 Accessing the graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.8 Graph algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Local factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 CPDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.2 Potentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.3 Decision networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.4 Methods which local factors must implement . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Graphical Model class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 DAGs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.2 Chain graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.3 Log-linear model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.4 Factor graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.5 Decision networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.6 Frequentist models with tied parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.7 Generative 2D lattice MRF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.8 Discriminative relational Markov networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.9 Structural/ relational uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.10 Dynamic Bayesian networks (DBNs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3 Inference 19
3.1 Types of inference engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1.1 Exact methods for models in which all hidden nodes are discrete . . . . . . . . . . . . . . . . 19
3.1.2 Exact methods for models in which some hidden nodes are not discrete . . . . . . . . . . . . 20
3.1.3 Deterministic approximations in which all hidden nodes are discrete . . . . . . . . . . . . . . 20
3.1.4 Deterministic approximations in which some hidden nodes are not discrete . . . . . . . . . . 21
3.1.5 Stochastic approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1