Posts tagged math
Posts tagged math
My colleague had this question today, so I decided to do a quick post about it.
\begin{align}
...
\end{align}
assigns a running (throughout the document or section of it) equation number to each line of the environment. Sometimes you want to suppress those numbers.
\begin{align*}
...
\end{align*}
suppresses equation numbers for every line of the align environment. But what to do if you have a formula that stretches over several lines? You want to give a number to the formula, but only one. The solution is to use \notag. Here is an example:
\begin{align}
\min_{\mathbf{W},\mathbf{H},\mathbf{b^\text{U}}, \mathbf{b^\text{I}}}
\sum_{(u, i, r_{u,i}) \in \mathcal{D}^\text{train}}
& ( \sigma(\mu + b^\text{U}_u + b^\text{I}_i + \langle \mathbf{w_u}, \mathbf{h_i} \rangle) - r_{u,i} )^2 \notag \\
& + \lambda_b (\| \mathbf{b^\text{U}} \|^2 + \| \mathbf{b^\text{I}} \|^2) \\
& + \lambda_u \| \mathbf{W} \|^2 + \lambda_i \| \mathbf{H} \|^2 , \notag
\end{align}
Just saw this in a blog post by Markus Weimer.
In Java, the result of abs(i) is negative if i equals Integer.MIN_VALUE. I never thought about that. On the other hand, I think (hope …) I never hit that corner case in any of my projects.
By the way, in C#, an OverflowException is thrown in such a case.
Bob Carpenter suggests to use the name “Zeno’s Version Numbering” for converging version numbers, and cites a nice joke explaining Zeno’s paradox.
As a bearer of the beautiful name Zeno, I am totally in favor of that suggestion ;-)
by Jonathan Chang. Nice!