--
Jiqiang
You're absolutely right -- we can set a local
variable and reuse. It'll save not only the log
evals, but also a bunch of steps and some memory
in the gradient calculations.
There are probably more optimizations of this
kind.
One big one we've looked at is the matrix
inverse and determinant in the multivariate
normal. Matt unfolded one to use the solver
from Eigen for more efficiency. We should also
add a version with an inverse-covariance matrix
parameter so that if it's constant, we don't
have to keep computing inverses every evaluation.
And of course, we're working on the propto
versions that don't normalize -- you can drop
lots of terms then
The parameterizations are the ones in Andrew's
"Bayesian Data Analysis" with type names and
greek letters matching the names and symbols in
the book, too.
- Bob
>
> --
> Jiqiang
>
Matt