Skip to content

feat: Add BatchCorr for batch-wise correlation calculation#13

Merged
CyrilJl merged 2 commits into
mainfrom
add-batchcorr
Aug 13, 2025
Merged

feat: Add BatchCorr for batch-wise correlation calculation#13
CyrilJl merged 2 commits into
mainfrom
add-batchcorr

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

This commit introduces BatchCorr, a new class for calculating the correlation coefficient of data that arrives in batches.

The BatchCorr class is implemented by composing the existing BatchCov and BatchVar classes, ensuring a numerically stable and efficient online algorithm.

Key changes:

  • Created batchstats/stats/corr.py with the BatchCorr implementation.
  • Added unit tests for BatchCorr in tests/test_stats.py, covering both single-dataset and two-dataset correlation calculations.
  • Updated the documentation in docs/source/core_classes.rst and README.md to include BatchCorr.
  • Updated __init__.py files to expose BatchCorr at the package level.

@CyrilJl CyrilJl marked this pull request as ready for review August 13, 2025 09:32
@CyrilJl CyrilJl merged commit 0e201c3 into main Aug 13, 2025
2 checks passed
@CyrilJl CyrilJl deleted the add-batchcorr branch August 13, 2025 09:34
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