-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
feat(stats/incr): add nancovariance accumulator #5980
base: develop
Are you sure you want to change the base?
Conversation
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi there! 👋
And thank you for opening your first pull request! We will review it shortly. 🏃 💨
Coverage Report
The above coverage report was generated for the changes in this PR. |
/** | ||
* Compute an incremental sample covariance while ignoring NaN values. | ||
* | ||
* @module @stdlib/stats/incr/nancovariance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @module @stdlib/stats/incr/nancovariance |
* @module @stdlib/stats/incr/nancovariance | ||
* | ||
* @example | ||
* var incrnancount = require( '@stdlib/stats/incr/nancovariance' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is incorrect.
@@ -0,0 +1,87 @@ | |||
/* eslint-disable stdlib/jsdoc-no-space-aligned-asterisks */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do NOT disable this lint rule. The lint rule is telling you explicitly our conventions.
// MAIN // | ||
|
||
/** | ||
* Returns an accumulator function which incrementally computes a sample covariance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This alignment is incorrect and does not follow our conventions.
* // returns 0 | ||
*/ | ||
function nancovariance() { | ||
var meanX = 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation is not what we want. The implementation should be a thin wrapper around incr/covariance
.
@@ -0,0 +1,60 @@ | |||
{ | |||
"name": "@stdlib/stats/incr/nancovariance", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation in this file is off. Should be 2-space indentation.
t.end(); | ||
}); | ||
|
||
// Additional tests... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order for this PR to move forward, you need to add the additional tests. I recommend you simply reuse and modify the tests in incr/covariance
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left an initial round of comments.
You are also missing the following files:
|
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves #5554.
Description
This pull request:
Related Issues
This pull request:
stats/incr/nancovariance
#5554Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers