Skip to content

Add CSP.#51

Merged
sinshu merged 4 commits intomainfrom
csp
Jan 30, 2026
Merged

Add CSP.#51
sinshu merged 4 commits intomainfrom
csp

Conversation

@sinshu
Copy link
Copy Markdown
Owner

@sinshu sinshu commented Jan 30, 2026

No description provided.

Copy link
Copy Markdown

@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: e3f0df0bbe

ℹ️ 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 +87 to +88
MathLinq.Covariance(class0, zero, cov0, 0);
MathLinq.Covariance(class1, zero, cov1, 0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Compute class covariance with actual means

These covariance calls pass a zero mean vector, which means the class covariances are computed as if the data are already centered. For generic inputs with non-zero feature means, MathLinq.Covariance will treat the mean offset as variance, biasing the GEVD and producing incorrect CSP filters and projections. This is a correctness issue whenever the input vectors are not explicitly zero-mean; computing the mean per class (e.g., via MeanAndCovariance) or centering the data before covariance would avoid the bias.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

@sinshu sinshu Jan 30, 2026

Choose a reason for hiding this comment

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

@codex
This is done intentionally to match the behavior of the MATLAB code used as a reference.

@sinshu sinshu merged commit fdf509d into main Jan 30, 2026
1 check passed
@sinshu sinshu deleted the csp branch March 20, 2026 12:53
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