Debian Codegraph @

texmf-dist/doc/latex/tikz-bayesnet/model_citation_influence.tex

raw
1 % model_citation_influence.tex
2 %
3 % Copyright (C) 2010,2011 Laura Dietz
4 % Copyright (C) 2012 Jaakko Luttinen
5 %
6 % This file may be distributed and/or modified
7 %
8 % 1. under the LaTeX Project Public License and/or
9 % 2. under the GNU General Public License.
10 %
11 % See the files LICENSE_LPPL and LICENSE_GPL for more details.
12
13 % Citation influence model
14 % Cite this model as
15 % Laura Dietz, Steffen Bickel, Tobias Scheffer.
16 % Unsupervised Prediction of Citation Influences.
17 % In: Proceedings of International Conference on Machine Learning. 2007
18
19 %\beginpgfgraphicnamed{model-citation-influence}
20 \begin{tikzpicture}
21
22 % Layout the variables
23 \matrix[row sep=0.5cm, column sep=1.2cm] (LDA)
24 { %
25 & %
26 & %
27 \node[latent] (gamma) {$\gamma$} ; & %
28 \node[latent] (lambda) {$\lambda$} ; & %
29 \node[latent] (psi) {$\psi$} ; %
30 \\
31 \\
32 \node[latent] (theta) {$\theta$} ; & %
33 & %
34 \node[latent] (C) {$C$} ; & %
35 \node[latent] (S) {$S$} ; & %
36 \\
37 & %
38 & %
39 \factor {T-f1} {Multi} {} {}; & %
40 & %
41 \factor {T-f2} {below:Multi} {} {}; & %
42 \\
43 \node[latent] (T') {$T'$} ; & %
44 & %
45 \node[latent] (T) {$T$} ; & %
46 \\
47 \factor {W'-f} {Multi} {} {}; & %
48 \node[latent] (phi) {$\phi$} ; & %
49 \factor {W-f} {Multi} {} {}; %
50 \\
51 \node[obs] (W') {$W'$} ; & %
52 & %
53 \node[obs] (W) {$W$} ;
54 \\
55 };
56
57 % Remaining factors
58 \factor[above=of T'] {T'-f} {left:Multi} {} {}; %
59 \factor[above=of theta] {theta-f} {left:Dir} {} {}; %
60 \factor[above=of C] {C-f} {left:Multi} {} {}; %
61 \factor[above=of S] {S-f} {left:Bern} {} {}; %
62 \factor[above=of gamma] {gamma-f} {left:Dir} {} {}; %
63 \factor[above=of lambda] {lambda-f} {left:Beta} {} {}; %
64 \factor[above=of psi] {psi-f} {left:Dir} {} {}; %
65 \factor[above=of phi] {phi-f} {left:Dir} {} {}; %
66
67 % Hyperparameters
68 \node[const, above=of theta] (atheta) {$\alpha_\theta$}; %
69 \node[const, above=of phi] (aphi) {$\alpha_\phi$}; %
70 \node[const, above=of gamma] (agamma) {$\alpha_\gamma$}; %
71 \node[const, above=of lambda, xshift=-0.5cm] (alambda1)
72 {$\alpha_{\lambda_\theta}$}; %
73 \node[const, above=of lambda, xshift=0.5cm] (alambda2)
74 {$\alpha_{\lambda_\psi}$}; %
75 \node[const, above=of psi] (apsi) {$\alpha_\psi$}; %
76
77 % Factor connections
78 \factoredge {phi} {W'-f} {W'} ; %
79 \factoredge {phi} {W-f} {W} ; %
80 \factoredge {theta} {T'-f} {T'} ; %
81 \factoredge {theta} {T-f1} {T} ; %
82 \factoredge {psi} {T-f2} {T} ; %
83 \factoredge {atheta} {theta-f} {theta} ; %
84 \factoredge {gamma} {C-f} {C} ; %
85 \factoredge {lambda} {S-f} {S} ; %
86 \factoredge {agamma} {gamma-f} {gamma} ; %
87 \factoredge {alambda1,alambda2} {lambda-f} {lambda} ; %
88 \factoredge {apsi} {psi-f} {psi} ; %
89 \factoredge {aphi} {phi-f} {phi} ; %
90
91 % Gates
92 \gate {W'-gate} {(W'-f)(W'-f-caption)} {T'} ; %
93 \gate {W-gate} {(W-f)(W-f-caption)} {T} ; %
94 \gate {T-gate} {(T-f1)(T-f1-caption)} {C} ;
95 \vgate {T-vgate} %
96 {(T-gate)} {$S=0$} %
97 {(T-f2)(T-f2-caption)} {$S=1$} %
98 {S} ; %
99
100 % Plates
101 \plate {LDA1} { %
102 (T')(T'-f)(T'-f-caption) %
103 (W')(W'-gate) %
104 } {$\forall w' \in c$} ; %
105
106 \plate {LDA2} { %
107 (LDA1) %
108 (theta)(theta-f)(theta-f-caption) %
109 } {$\forall c \in \mathcal{C}$} ; %
110
111 \plate {} { %
112 (phi)(phi-f)(phi-f-caption) %
113 } {$\forall t \in \mathcal{T}$} ; %
114
115 \plate {P1} { %
116 (W)(W-gate) %
117 (T)(T-vgate) %
118 (C)(C-f)(C-f-caption) %
119 (S)(S-f)(S-f-caption) %
120 } {$\forall w \in d$} ;
121
122 \plate {} { %
123 (P1) %
124 (gamma)(gamma-f)(gamma-f-caption) %
125 (lambda)(lambda-f)(lambda-f-caption) %
126 (psi)(psi-f)(psi-f-caption) %
127 } {$\forall d \in \mathcal{D}$} ; %
128
129 \end{tikzpicture}
130 %\endpgfgraphicnamed
131
132 %%% Local Variables:
133 %%% mode: tex-pdf
134 %%% TeX-master: "example"
135 %%% End: