Skip to content

Try some optimizations#117

Closed
Kss2k wants to merge 7 commits intomainfrom
lms-optimizations
Closed

Try some optimizations#117
Kss2k wants to merge 7 commits intomainfrom
lms-optimizations

Conversation

@Kss2k
Copy link
Owner

@Kss2k Kss2k commented Jan 13, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +159 to +160
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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@Kss2k Kss2k closed this Jan 13, 2026
@Kss2k Kss2k deleted the lms-optimizations branch January 13, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant