-
Notifications
You must be signed in to change notification settings - Fork 0
/
guide.tex
70 lines (68 loc) · 4.44 KB
/
guide.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
% \paragraph{Algorithm 3.} Pseudocode representation of Tapqir guide.
\algnewcommand{\Initialize}[1]{%
\State \textbf{Variational parameter initializations} $\{ \mathrm{initial\:value}, \quad \mathrm{constraint} \}$:
\Statex \hspace*{\algorithmicindent}\parbox[t]{.8\linewidth}{\raggedright #1}
}
\begin{algorithm}
\caption{Pseudocode representation of \emph{cosmos} guide.}\label{alg:guide}
\begin{algorithmic}[1]
\Initialize{
$g_\mathsf{mean} \gets \{ 5, \quad \mathbb{R}_{>0} \} $;
$g_\mathsf{beta} \gets \{ 100, \quad \mathbb{R}_{>0} \} $ \\
$\sigma^{xy}_\mathsf{mean} \gets \{ 0, \quad (0, (P+1) / \sqrt{12}) \} $;
$\sigma^{xy}_\mathsf{beta} \gets \{ 100, \quad \mathbb{R}_{>2} \} $ \\
$\pi_\mathsf{mean} \gets \{ 0.5, \quad [0, 1] \} $;
$\pi_\mathsf{size} \gets \{ 2, \quad \mathbb{R}_{>2} \} $ \\
$\lambda_\mathsf{mean} \gets \{ 0.5, \quad \mathbb{R}_{>0} \} $;
$\lambda_\mathsf{beta} \gets \{ 100, \quad \mathbb{R}_{>0} \} $ \\
$\mu^b_\mathsf{mean} \gets \{ \mathsf{mean}(D)^{\mathsf{AOI}[N]}, \quad \mathbb{R}_{>0} \}$;
$\sigma^b_\mathsf{mean} \gets \{ 1^{\mathsf{AOI}[N]}, \quad \mathbb{R}_{>0} \}$ \\
$b_\mathsf{mean} \gets \{ \mathsf{mean}(D)^{\mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad \mathbb{R}_{>0} \}$ \\
$b_\mathsf{beta} \gets \{ 1^{\mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad \mathbb{R}_{>0} \} $ \\
$m_\mathsf{prob} \gets \{ 0.5^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad [ 0, 1 ] \} $ \\
$h_\mathsf{mean} \gets \{ 2000^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad \mathbb{R}_{>0} \} $ \\
$h_\mathsf{beta} \gets \{ 0.001^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad \mathbb{R}_{>0} \} $ \\
$w_\mathsf{mean} \gets \{ 1.5^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad [0.75, 2.25] \} $ \\
$w_\mathsf{size} \gets \{ 100^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad \mathbb{R}_{>2} \} $ \\
$x_\mathsf{mean} \gets \{ 0^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad [-(P+1)/2, (P+1)/2] \} $ \\
$y_\mathsf{mean} \gets \{ 0^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad [-(P+1)/2, (P+1)/2] \} $ \\
$xy_\mathsf{size} \gets \{ 200^{\mathsf{spot}[K] \times \mathsf{AOI}[N] \times \mathsf{frame}[F]}, \quad \mathbb{R}_{>2} \} $ }
\State $g \sim \mathbf{Gamma}(g_\mathsf{mean}, \sqrt{g_\mathsf{mean} / g_\mathsf{beta}})$
\Comment{camera gain}
\State $\sigma^{xy} \sim \mathbf{AffineBeta}(\sigma^{xy}_\mathsf{mean}, \sigma^{xy}_\mathsf{size}, 0, (P+1) / \sqrt{12})$
\Comment{std of on-target spot position (pixels)}
\State $\pi \sim \mathbf{Beta}(\pi_\mathsf{mean}, \pi_\mathsf{size})$
\Comment{average specific binding probability}
\State $\lambda \sim \mathbf{Gamma}(\lambda_\mathsf{mean}, \sqrt{\lambda_\mathsf{mean} / \lambda_\mathsf{beta}})$
\Comment{non-specific binding density}
\ForAll{$\mathsf{AOI}[N+N_\mathsf{c}]$}
\State $\mu^b \sim \mathbf{Delta}(\mu^b_\mathsf{mean})$
\Comment{mean background intensity}
\State $\sigma^b \sim \mathbf{Delta}(\sigma^b_\mathsf{mean})$
\Comment{std of background intensity}
\ForAll{$\mathsf{frame}[F]$}
\State $b \sim \mathbf{Gamma}(b_\mathsf{mean}, \sqrt{b_\mathsf{mean} / b_\mathsf{beta}})$
\Comment{background intensity}
\ForAll{$\mathsf{spot}[K]$}
\State $m \sim \mathbf{Bernoulli}(m_\mathsf{prob})$
\Comment{spot presence}
\If{m = 1}
\State $h \sim \mathbf{Gamma}(h_\mathsf{mean}, \sqrt{h_\mathsf{mean} / h_\mathsf{beta}})$
\Comment{spot intensity}
\State $w \sim \mathbf{AffineBeta}(w_\mathsf{mean}, w_\mathsf{size}, 0.75, 2.25)$
\Comment{spot width}
\State $x \sim \mathbf{AffineBeta} \left( x_\mathsf{mean}, xy_\mathsf{size}, -(P+1)/2, (P+1)/2 \right) $
\Comment{$x$-axis center}
\State $y \sim \mathbf{AffineBeta} \left( y_\mathsf{mean}, xy_\mathsf{size}, -(P+1)/2, (P+1)/2 \right)$
\Comment{$y$-axis center}
\ElsIf{m = 0}
\State $h \sim \mathbf{HalfNormal}(10000)$
\State $w \sim \mathbf{Uniform}(0.75, 2.25)$
\State $x \sim \mathbf{Uniform}(-(P+1)/2, (P+1)/2)$
\State $y \sim \mathbf{Uniform}(-(P+1)/2, (P+1)/2)$
\EndIf
\EndFor
\EndFor
\EndFor
\end{algorithmic}
\end{algorithm}