Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4a6a2496d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/equations_lms.cpp
Outdated
| const arma::mat tmp = arma::solve(arma::trans(B), Psi, arma::solve_opts::fast); | ||
| const arma::mat noise = arma::solve(B, tmp, arma::solve_opts::fast); |
There was a problem hiding this comment.
Restore correct order for B^{-1} Psi B^{-T}
The new computation of noise changes the multiplication order from B^{-1} * Psi * B^{-T} to B^{-1} * B^{-T} * Psi because tmp = solve(trans(B), Psi) yields B^{-T} * Psi and then solve(B, tmp) left-multiplies by B^{-1}. These are only equivalent when Psi commutes with B^{-T} (e.g., Psi is diagonal in the same basis), which is not generally true. For non-diagonal Psi, this produces an incorrect covariance term and will skew Sigma(z)/likelihood results. Consider solving in a way that preserves B^{-1} * Psi * B^{-T} (e.g., solve left for B^{-1} * Psi, then right-solve for B^{-T}).
Useful? React with 👍 / 👎.
No description provided.