summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikz-bayesnet/model_citation_influence.tex
blob: 5df66a5a190b1fcefa714ca511f7d26916edf904 (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
% model_citation_influence.tex
%
% Copyright (C) 2010,2011 Laura Dietz
% Copyright (C) 2012 Jaakko Luttinen
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU General Public License.
%
% See the files LICENSE_LPPL and LICENSE_GPL for more details.

% Citation influence model
% Cite this model as 
% Laura Dietz, Steffen Bickel, Tobias Scheffer. 
% Unsupervised Prediction of Citation Influences. 
% In: Proceedings of International Conference on Machine Learning. 2007

%\beginpgfgraphicnamed{model-citation-influence}
\begin{tikzpicture}

  % Layout the variables
  \matrix[row sep=0.5cm, column sep=1.2cm] (LDA)
  { %
    & %
    & %
    \node[latent] (gamma)  {$\gamma$} ; & %
    \node[latent] (lambda) {$\lambda$} ; & %
    \node[latent] (psi)    {$\psi$} ; %
    \\
    \\
    \node[latent] (theta)  {$\theta$} ; & %
    & %
    \node[latent] (C)      {$C$} ; & %
    \node[latent] (S)      {$S$} ; & %
    \\
    & %
    & %
    \factor       {T-f1}   {Multi} {} {}; & %
    & %
    \factor       {T-f2}   {below:Multi} {} {}; & %
    \\
    \node[latent] (T')     {$T'$} ; & %
    & %
    \node[latent] (T)      {$T$} ; & %
    \\
    \factor       {W'-f}   {Multi} {} {}; & %
    \node[latent] (phi)    {$\phi$} ; & %
    \factor       {W-f}    {Multi} {} {}; %
    \\
    \node[obs] (W')        {$W'$} ; & %
    & %
    \node[obs] (W)         {$W$} ;
    \\
  };

  % Remaining factors
  \factor[above=of T']     {T'-f}     {left:Multi} {} {}; %
  \factor[above=of theta]  {theta-f}  {left:Dir} {} {}; %
  \factor[above=of C]      {C-f}      {left:Multi} {} {}; %
  \factor[above=of S]      {S-f}      {left:Bern} {} {}; %
  \factor[above=of gamma]  {gamma-f}  {left:Dir} {} {}; %
  \factor[above=of lambda] {lambda-f} {left:Beta} {} {}; %
  \factor[above=of psi]    {psi-f}    {left:Dir} {} {}; %
  \factor[above=of phi]    {phi-f}    {left:Dir} {} {}; %

  % Hyperparameters
  \node[const, above=of theta]  (atheta)  {$\alpha_\theta$}; %
  \node[const, above=of phi]    (aphi)    {$\alpha_\phi$}; %
  \node[const, above=of gamma]  (agamma)  {$\alpha_\gamma$}; %
  \node[const, above=of lambda, xshift=-0.5cm] (alambda1)
  {$\alpha_{\lambda_\theta}$}; %
  \node[const, above=of lambda, xshift=0.5cm] (alambda2)
  {$\alpha_{\lambda_\psi}$}; %
  \node[const, above=of psi]    (apsi)    {$\alpha_\psi$}; %

  % Factor connections
  \factoredge {phi}               {W'-f}     {W'} ; %
  \factoredge {phi}               {W-f}      {W} ; %
  \factoredge {theta}             {T'-f}     {T'} ; %
  \factoredge {theta}             {T-f1}     {T} ; %
  \factoredge {psi}               {T-f2}     {T} ; %
  \factoredge {atheta}            {theta-f}  {theta} ; %
  \factoredge {gamma}             {C-f}      {C} ; %
  \factoredge {lambda}            {S-f}      {S} ; %
  \factoredge {agamma}            {gamma-f}  {gamma} ; %
  \factoredge {alambda1,alambda2} {lambda-f} {lambda} ; %
  \factoredge {apsi}              {psi-f}    {psi} ; %
  \factoredge {aphi}              {phi-f}    {phi} ; %

  % Gates
  \gate {W'-gate} {(W'-f)(W'-f-caption)} {T'} ; %
  \gate {W-gate}  {(W-f)(W-f-caption)}   {T} ; %
  \gate {T-gate}  {(T-f1)(T-f1-caption)} {C} ;
  \vgate {T-vgate} %
  {(T-gate)} {$S=0$} %
  {(T-f2)(T-f2-caption)} {$S=1$} %
  {S} ; %

  % Plates
  \plate {LDA1} { %
    (T')(T'-f)(T'-f-caption) %
    (W')(W'-gate) %
  } {$\forall w' \in c$} ; %

  \plate {LDA2} { %
    (LDA1) %
    (theta)(theta-f)(theta-f-caption) %
  } {$\forall c \in \mathcal{C}$} ; %

  \plate {} { %
    (phi)(phi-f)(phi-f-caption) %
  } {$\forall t \in \mathcal{T}$} ; %

  \plate {P1} { %
    (W)(W-gate) %
    (T)(T-vgate) %
    (C)(C-f)(C-f-caption) %
    (S)(S-f)(S-f-caption) %
  } {$\forall w \in d$} ;

  \plate {} { %
    (P1) %
    (gamma)(gamma-f)(gamma-f-caption) %
    (lambda)(lambda-f)(lambda-f-caption) %
    (psi)(psi-f)(psi-f-caption) %
  } {$\forall d \in \mathcal{D}$} ; %

\end{tikzpicture}
%\endpgfgraphicnamed

%%% Local Variables: 
%%% mode: tex-pdf
%%% TeX-master: "example"
%%% End: