Skip to content

feat: add stats/incr/nanmcovariance #6865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

SergeantQuickscoper
Copy link

Resolves #5567.

Description

What is the purpose of this pull request?

This pull request:

  • This PR adds the nanmcovariance module to the stats/incr/* namespace, providing a way to compute a moving unbiased sample covariance incrementally, while handling NaN values. This commit was made to address Issue [RFC]: add stats/incr/nanmcovariance #5567 and as suggested in the issue, it is based on a thin wrapper around mcovariance, similar to the relationship between nansum and sum, maintaining API consistency and design. This commit includes appropriate documentation and tests for the new purpose of the package, styles of which are consistent to the stats/incr/* namespace.

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

…/* namespace

This commit adds the `nanmcovariance` module to the `stats/incr/*` namespace, providing a way to compute a moving unbiased sample covariance incrementally,
while handling NaN values. This commit was made to address Issue stdlib-js#5567 and as suggested in the issue, it is based on a thin wrapper around wmean, similar
to the relationship between nansum and sum, mainting API consistency and design. This commit includes appropriate documentation and tests
for the new purpose of the package, styles of which are consistent to the stats/incr/* namespace.

Fixes: stdlib-js#5567 [RFC]
Private-ref: stdlib-js#5567
Authored-by: Don Chacko <donisepic30@gmail.com>
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Apr 29, 2025
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/nanmcovariance $\color{red}289/291$
$\color{green}+99.31\%$
$\color{red}6/7$
$\color{green}+85.71\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{red}289/291$
$\color{green}+99.31\%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add stats/incr/nanmcovariance
2 participants