annotate toolboxes/FullBNT-1.0.7/bnt/potentials/README @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 The following kinds of potentials are supported
wolffd@0 2 - dpot: discrete
wolffd@0 3 - upot: utility
wolffd@0 4 - mpot: Gaussian in moment form
wolffd@0 5 - cpot: Gaussian in canonical form
wolffd@0 6 - cgpot: conditional (mixture) Gaussian, a list of mpots/cpot
wolffd@0 7 - scgpot: stable conditional Gaussian, a list of scgcpots
wolffd@0 8 - scgcpot: just used by scgpot
wolffd@0 9
wolffd@0 10 Many of these are described in the following book
wolffd@0 11
wolffd@0 12 @book{Cowell99,
wolffd@0 13 author = "R. G. Cowell and A. P. Dawid and S. L. Lauritzen and D. J. Spiegelhalter",
wolffd@0 14 title = "Probabilistic Networks and Expert Systems",
wolffd@0 15 year = 1999,
wolffd@0 16 publisher = "Springer"
wolffd@0 17 }
wolffd@0 18
wolffd@0 19 CPD_to_pot converts P(Z|A,B,...) to phi(A,B,...,Z).
wolffd@0 20
wolffd@0 21 A table is like a dpot, except it is a structure, not an object.
wolffd@0 22 Code that uses tables is faster but less flexible.
wolffd@0 23
wolffd@0 24 -----------
wolffd@0 25
wolffd@0 26 A potential is a joint probability distribution on a set of nodes,
wolffd@0 27 which we call the potential's domain (which is always sorted).
wolffd@0 28 A potential supports the operations of multiplication and
wolffd@0 29 marginalization.
wolffd@0 30
wolffd@0 31 If the nodes are discrete, the potential can be represented as a table
wolffd@0 32 (multi-dimensional array). If the nodes are Gaussian, the potential
wolffd@0 33 can be represented as a quadratic form. If there are both discrete and
wolffd@0 34 Gaussian nodes, we use a table of quadratic forms. For details on the
wolffd@0 35 Gaussian case, see below.
wolffd@0 36
wolffd@0 37 For discrete potentials, the 'sizes' field specifies the number of
wolffd@0 38 values each node in the domain can take on. For continuous potentials,
wolffd@0 39 the 'sizes' field specifies the block-size of each node.
wolffd@0 40
wolffd@0 41 If some of the nodes are observed, extra complications arise. We
wolffd@0 42 handle the discrete and continuous cases differently. Suppose the
wolffd@0 43 domain is [X Y], with sizes [6 2], where X is observed to have value x.
wolffd@0 44 In the discrete case, the potential will have many zeros in it
wolffd@0 45 (T(X,:) will be 0 for all X ~= x), which can be inefficient. Instead,
wolffd@0 46 we set sizes to [1 2], to indicate that X has only one possible value
wolffd@0 47 (namely x). For continuous nodes, we set sizes = [0 2], to indicate that X no
wolffd@0 48 longer appears in the mean vector or covariance matrix (we must avoid
wolffd@0 49 0s in Sigma, lest it be uninvertible). When a potential is created, we
wolffd@0 50 assume the sizes of the nodes have been adjusted to include the
wolffd@0 51 evidence. This is so that the evidence can be incorporated at the
wolffd@0 52 outset, and thereafter the inference algorithms can ignore it.
wolffd@0 53
wolffd@0 54 ------------
wolffd@0 55
wolffd@0 56 A Gaussian potential can be represented in terms of its
wolffd@0 57 moment characteristics (mu, Sigma, logp), or in terms of its canonical
wolffd@0 58 characteristics (g, h, K). Although the moment characteristics are
wolffd@0 59 more familiar, it turns out that canonical characteristics are
wolffd@0 60 more convenient for the junction tree algorithm, for the same kinds of
wolffd@0 61 reasons why backwards inference in an LDS uses the information form of
wolffd@0 62 the Kalman filter (see Murphy (1998a) for a discussion).
wolffd@0 63
wolffd@0 64 When working with *conditional* Gaussian potentials, the method proposed
wolffd@0 65 by Lauritzen (1992), and implemented here, requires converting from
wolffd@0 66 canonical to moment form before marginalizing the discrete variables,
wolffd@0 67 and converting back from moment to canonical form before
wolffd@0 68 multiplying/dividing. A new algorithm, due to Lauritzen and Jensen
wolffd@0 69 (1999), works exclusively in moment form, and
wolffd@0 70 hence is more numerically stable. It can also handle 0s in the
wolffd@0 71 covariance matrix, i.e., deterministic relationships between cts
wolffd@0 72 variables. However, it has not yet been implemented,
wolffd@0 73 since it requires major changes to the jtree algorithm.
wolffd@0 74
wolffd@0 75 In Murphy (1998b) we extend Lauritzen (1992) to handle
wolffd@0 76 vector-valued nodes. This means the vectors and matrices become block
wolffd@0 77 vectors and matrices. This manifests itself in the code as in the
wolffd@0 78 following example.
wolffd@0 79 Suppose we have a potential on nodes dom=[3,4,7] with block sizes=[2,1,3].
wolffd@0 80 Then nodes 3 and 7 correspond to blocks 1,3 which correspond to indices 1,2,4,5,6.
wolffd@0 81 >> find_equiv_posns([3 7], dom)=[1,3]
wolffd@0 82 >> block([1,3],blocks)=[1,2,4,5,6].
wolffd@0 83
wolffd@0 84 For more details, see
wolffd@0 85
wolffd@0 86 - "Filtering and Smoothing in Linear Dynamical Systems using the Junction Tree Algorithm",
wolffd@0 87 K. Murphy, 1998a. UCB Tech Report.
wolffd@0 88
wolffd@0 89 - "Inference and learning in hybrid Bayesian networks",
wolffd@0 90 K. Murphy. UCB Technical Report CSD-98-990, 1998b.
wolffd@0 91
wolffd@0 92 - "Propagation of probabilities, means and variances in mixed
wolffd@0 93 graphical association models", S. L. Lauritzen, 1992, JASA 87(420):1098--1108.
wolffd@0 94
wolffd@0 95 - "Causal probabilistic networks with both discrete and continuous variables",
wolffd@0 96 K. G. Olesen, 1993. PAMI 3(15). This discusses implementation details.
wolffd@0 97
wolffd@0 98 - "Stable local computation with Conditional Gaussian distributions",
wolffd@0 99 S. Lauritzen and F. Jensen, 1999. Univ. Aalborg Tech Report R-99-2014.
wolffd@0 100 www.math.auc.dk/research/Reports.html.