Skip to content

feat: add stats/incr/nanmcovariance #6864

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

Conversation

SergeantQuickscoper
Copy link

@SergeantQuickscoper SergeantQuickscoper commented Apr 29, 2025

subject: adds nanwmean package to the stats/incr/* namespace
type: feat

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 wmean, 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#5628
Authored-by: Don Chacko <[email protected]>
@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

stdlib-bot commented Apr 29, 2025

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.

@SergeantQuickscoper SergeantQuickscoper changed the title feat(stats/incr/nanmcovariance): add nanmcovariance to the `stats/incr… feat: add stats/incr/nanmcovariance Apr 29, 2025
…and benchmark cases

This commit fixes a coverage issue with the previous commit where a branch of the main.js file of the nanmcovariance package, is not adequetly tested.
It now ensures that the branch for known and unknown means are tested and benchmarked, for full coverage.

Authored by: Don Chacko <[email protected]>
@SergeantQuickscoper SergeantQuickscoper deleted the feature/nanmcovariance branch April 29, 2025 15:14
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Apr 29, 2025
@SergeantQuickscoper SergeantQuickscoper restored the feature/nanmcovariance branch April 29, 2025 15:14
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. 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