File: vmp_gaussian.rst

package info (click to toggle)
python-bayespy 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,132 kB
  • sloc: python: 22,402; makefile: 156
file content (87 lines) | stat: -rw-r--r-- 2,465 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Multivariate normal distribution
--------------------------------

.. math::

   \mathbf{x} &\sim \mathcal{N}(\boldsymbol{\mu}, \mathbf{\Lambda}),

.. math::

   \mathbf{x},\boldsymbol{\mu} \in \mathbb{R}^{D}, 
   \quad \mathbf{\Lambda} \in \mathbb{R}^{D \times D},
   \quad \mathbf{\Lambda} \text{ symmetric positive definite}

.. math::

   \log\mathcal{N}( \mathbf{x} | \boldsymbol{\mu}, \mathbf{\Lambda} )
   &= 
   - \frac{1}{2} \mathbf{x}^{\mathrm{T}} \mathbf{\Lambda} \mathbf{x}
   + \mathbf{x}^{\mathrm{T}} \mathbf{\Lambda} \boldsymbol{\mu}
   - \frac{1}{2} \boldsymbol{\mu}^{\mathrm{T}} \mathbf{\Lambda}
     \boldsymbol{\mu}
   + \frac{1}{2} \log |\mathbf{\Lambda}|
   - \frac{D}{2} \log (2\pi)

.. math::

   \mathbf{u} (\mathbf{x})
   &=
   \left[ \begin{matrix}
     \mathbf{x}
     \\
     \mathbf{xx}^{\mathrm{T}}
   \end{matrix} \right]
   \\
   \boldsymbol{\phi} (\boldsymbol{\mu}, \mathbf{\Lambda})
   &=
   \left[ \begin{matrix}
     \mathbf{\Lambda} \boldsymbol{\mu} 
     \\
     - \frac{1}{2} \mathbf{\Lambda}
   \end{matrix} \right]
   \\
   \boldsymbol{\phi}_{\boldsymbol{\mu}} (\mathbf{x}, \mathbf{\Lambda})
   &=
   \left[ \begin{matrix}
     \mathbf{\Lambda} \mathbf{x} 
     \\
     - \frac{1}{2} \mathbf{\Lambda}
   \end{matrix} \right]
   \\
   \boldsymbol{\phi}_{\mathbf{\Lambda}} (\mathbf{x}, \boldsymbol{\mu})
   &=
   \left[ \begin{matrix}
     - \frac{1}{2} \mathbf{xx}^{\mathrm{T}}
     + \frac{1}{2} \mathbf{x}\boldsymbol{\mu}^{\mathrm{T}}
     + \frac{1}{2} \boldsymbol{\mu}\mathbf{x}^{\mathrm{T}}
     - \frac{1}{2} \boldsymbol{\mu\mu}^{\mathrm{T}}
     \\
     \frac{1}{2}
   \end{matrix} \right]
   \\
   g (\boldsymbol{\mu}, \mathbf{\Lambda})
   &=
   - \frac{1}{2} \operatorname{tr}(\boldsymbol{\mu\mu}^{\mathrm{T}}
                                   \mathbf{\Lambda} )
   + \frac{1}{2} \log |\mathbf{\Lambda}|
   \\
   g_{\boldsymbol{\phi}} (\boldsymbol{\phi})
   &=
   \frac{1}{4} \boldsymbol{\phi}^{\mathrm{T}}_1 \boldsymbol{\phi}^{-1}_2 
   \boldsymbol{\phi}_1
   + \frac{1}{2} \log | -2 \boldsymbol{\phi}_2 |
   \\
   f(\mathbf{x})
   &= - \frac{D}{2} \log(2\pi)
   \\
   \overline{\mathbf{u}}  (\boldsymbol{\phi})
   &=
   \left[ \begin{matrix}
     - \frac{1}{2} \boldsymbol{\phi}^{-1}_2 \boldsymbol{\phi}_1
     \\
     \frac{1}{4} \boldsymbol{\phi}^{-1}_2 \boldsymbol{\phi}_1
     \boldsymbol{\phi}^{\mathrm{T}}_1 \boldsymbol{\phi}^{-1}_2 
     - \frac{1}{2} \boldsymbol{\phi}^{-1}_2
   \end{matrix} \right]