Untitled

 avatar
unknown
latex
16 days ago
1.5 kB
6
Indexable
\begin{algorithm}[t]
    \footnotesize
    \caption{ECD Inference}
    \label{alg:algorithm}
    \KwIn{Graph $G = (V, E)$; Sharing links $E$.}
    \textbf{Hyper-parameters}: number of communities $C$, social prior size $s$, \\
    \hspace{2.1cm} echo-chamber prior size $h$, learning rate $\lambda$, \\
    \hspace{2.1cm} number of optimization steps for each iteration $H$. \\
    \KwOut{Polarities $\eta$, memberships $\theta$, and $\phi$.}
    
    Randomly initialize $\Theta^{(0)} = \{\eta^{(0)}, \theta^{(0)}, \phi^{(0)}\}$ and set $t=0$\;
    
    \Repeat{convergence}{
        Let $\Theta^{(*)} = \Theta^{(t)}$\;
        \For{$w \in \{1, \ldots, H\}$}{
            Sample $X$ from $E \cup E^\I$\;
            \ForEach{$\ell, \p \in X$ and $c \in \{1, \ldots, C\}$}{
                Compute posteriors $\gamma_{\ell,c}$ and $\xi_{\p,c}$ according to Eqs.~\ref{eq:posteriors},~\ref{eq:priors} and the current parameters $\Theta^{(t)}$\;
                \tcp*[h]{E Step}
            }
            Compute the expected likelihood $\mathcal{Q}$ according to Eqs.~\ref{eq:complete-llk} and~\ref{eq:priors} and the posteriors $\gamma$ and $\xi$\;
            Update the parameters:
            \[
            \Theta^{(*)} = \Theta^{(*)} + \lambda \nabla_{\Theta} \mathcal{Q}(\Theta^{(*)}, \Theta^{(t)}|X)
            \]
            \tcp*[h]{M Step}
        }
        Set $\Theta^{(t+1)} = \Theta^{(*)}$ and increase $t$\;
    }
    \normalsize
\end{algorithm}
Editor is loading...
Leave a Comment