Conversation
…tern-csp Add Common Spatial Pattern (CSP) analysis
There was a problem hiding this comment.
💡 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".
| MathLinq.Covariance(class0, zero, cov0, 0); | ||
| MathLinq.Covariance(class1, zero, cov1, 0); |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
@codex
This is done intentionally to match the behavior of the MATLAB code used as a reference.
No description provided.