I'm trying to annotate an diagram of a neural network with an equation that describes the activity of each node. I can't get the equation to the upper right, where I want it to be. I've tried using the scope environment in TikZ, \vspace and \hspace outside of tikz and even multicols.
I feel there likely is an easier or more elegant way of doing this. To make it easier to find, the equation I want to put in the upper right is, in this example, immediately after the tikzpicture environment ends. Here's my MWE:
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\definecolor{burntorange}{RGB}{204,85,0}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]
\node[main node, scale=1.4] (interest) {$\vec{v}_i$};
\node[main node, fill=blue!10] (j) [below left of=interest] {$\vec{v}_j$};
\node[main node, fill=blue!10] (k) [below right of=j] {$\vec{v}_k$};
\node[main node, fill=burntorange, below right of=interest, distance = 5cm ] (input) [below right of=interest] {input $u$};
\begin{scope}[every node/.style={font=\sffamily\small}]
\path
(interest)
edge [bend right] node[left] {$\mathbf{M}_{ji}$} (j)
edge [loop above] node[above] {$\mathbf{M}_{ii}$} (interest)
edge [bend left] node {$\mathbf{M}_{ki}$} (k);
\path[every edge/.style={gray,draw=gray}]
(j) edge node [right] {$\mathbf{M}_{ij}$} (interest)
edge [loop left] node {$\mathbf{M}_{jj}$} (j)
edge [bend right] node[left] {$\mathbf{M}_{jk}$} (k)
(k) edge node [right] {$\mathbf{M}_{kj}$} (j)
edge node [bend right] {$\mathbf{M}_{ik}$} (interest)
edge [loop below] node {$\mathbf{M}_{kk}$} (k)
(input) edge [bend right] node {$\mathbf{W}_i$} (interest)
edge [bend left] node {$\mathbf{W}_k$} (k);
\end{scope}
\end{tikzpicture}
{$\tau_{i}\frac{d\vec{v_{i}}}{dt}=-\vec{v}_{i}+\mathbf{M}_{ii}\vec{v}_{i}+
\sum_{j\neq i}\mathbf{M}_{ij}\vec{v}_{j}+\mathbf{W}_{i}\vec{u}$}
\end{document}
