-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathch2-content.tex
116 lines (97 loc) · 3.49 KB
/
ch2-content.tex
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
\chapter{Data preparation}
\section{First section}
\lipsum[8-9]
\section{Second section}
\lipsum[10-11]
\clearpage
\newgeometry{margin=0.7in}
\begin{landscape}
\begin{table}
\centering
\resizebox{\linewidth}{!}{%
\begin{tabular}{lllllll}
\toprule
\ttt{user\_id}
& \ttt{status\_id}
& \ttt{created\_at}
& \ttt{text}
& \ttt{is\_retweet}
& \ttt{hashtags}
& \ttt{lang}\\
\toprule
%
833499844517961728
& 1255290686250811392
& 2020-04-29 00:19:56
& \pbox{8cm}{The NY Dem Presidential Primary on\\ 6/23 is canceled due to COVID-19. Other elections on 6/23 will still take place:\\ https://t.co/0P6PMPq20h\\ - Rock the Vote}
& \ttt{FALSE}
& \ttt{NA}
& en\\
\midrule
581180392
& 1254511313331597314
& 2020-04-26 20:42:59
& \pbox{8cm}{In the midst of the current \#pandemic, it is more important than ever to get creative\\ with your \#homeworkout. One great\\ \#trainfromhome option includes making a sandbag from a laundry bag. Here's how to implement sandbag circuits:\\ https://t.co/Ottxy2YZAq}
& \ttt{FALSE}
& \pbox{6cm}{\ttt{"pandemic",}\\ \ttt{"homeworkout",}\\ \ttt{"trainfromhome"}}
& en\\
\midrule
819296296062201857
& 1304087649011953665
& 2020-09-10 16:01:38
& \pbox{8cm}{\#Masks serve 2 purposes:\\[3mm] 1) To remind everyone that there is supposed to be a deadly pandemic, despite nobody knowing anybody who is sick with covid, and \\[3mm] 2) To increase incidence of pulmonary illnesses, which will later be blamed on covid. Proof: See my pinned tweet.}
& \ttt{FALSE}
& \ttt{"Masks"}
& en\\
\midrule
2350488460
& 1322387795718119425
& 2020-10-31 03:59:53
& \pbox{8cm}{\#GOPBetrayedAmerica decisions are being made to take your voice/vote away. The same \#GOPCorruptionOverCountry that\\ won't respond with help for every American\\ during this once a century pandemic\\ https://t.co/Gg5gecx7tb}
& \ttt{FALSE}
& \pbox{6cm}{\ttt{"GOPBetrayedAmerica",}\\ \ttt{"GOPCorruptionOverCountry"}}
& en\\
\bottomrule
\end{tabular}}
\caption{\label{tbl:tweetsample}This caption describes the above table.}
\end{table}
\end{landscape}
\clearpage
\restoregeometry
\section{Third section}
\lipsum[12-13]
Did you see \autoref{tbl:tweetsample}?
\begin{algorithm}[h]
\small
\begin{algorithmic}
\REQUIRE Number of topics $K$, Dirichlet hyperparameters $\alpha$ and $\beta$, collection
of biterms $\mathbf{B}$
\ENSURE $\widehat{\bm{\theta}}$, $\widehat{\bm{\Phi}}$
\STATE Randomly assign a topic to all biterms, $b_{i} \,=\, (w_{i,1},\,w_{i,2}) \,\in\,
\mathbf{B}$
\FOR{$iter=1$ to $N$}
\FORALL{biterm, $b_{i}$}
\STATE Update topic assignment of $b_{i}$ according to \autoref{eqn:btm_conditional}
\STATE Update $n_{k}$, $n_{w_{i,1}|k}$, $n_{w_{i,2}|k}$
\ENDFOR
\ENDFOR
\STATE Compute estimates for $\bm{\theta}$ and $\bm{\Phi}$ using \autoref{eqn:btm_theta} and
\autoref{eqn:btm_phi}, respectively
\end{algorithmic}
\caption{\label{alg:btm}Collapsed Gibbs sampling algorithm for BTM.}
\end{algorithm}
\begin{equation}
P(z_{i}=k\,|\,\mathbf{z}_{(i)},\,\textbf{B}) \,\propto\, (n_{(i),\,k} + \alpha)
\frac{(n_{(i),\,w_{i,1}\,|\,k} + \beta)(n_{(i),\,w_{i,2}\,|\,k} + \beta)}
{(\sum_{w=1}^{W}n_{(i),\,w\,|\,k} + W\beta + 1)(\sum_{w=1}^{W}n_{(i),\,w\,|\,k} + W\beta)},
\label{eqn:btm_conditional}
\end{equation}
\begin{equation}
\widehat{\theta}_{k} \,=\, \frac{n_{k} \,+\, \alpha}{N_{B} \,+\, K\alpha}
\label{eqn:btm_theta}
\end{equation}
\begin{equation}
\widehat{\phi}_{k,w} \,=\, \frac{n_{w\,|\,k} \,+\, \beta}{\sum_{w=1}^{W}n_{w\,|\,k} \,+\, W\beta}
\label{eqn:btm_phi}
\end{equation}
\lipsum[14] Go and re-read \autoref{alg:btm}!