-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add Wald distribution mean package #9502
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
base: develop
Are you sure you want to change the base?
feat: add Wald distribution mean package #9502
Conversation
| * @example | ||
| * var y = mean( 0.0, 1.0 ); | ||
| * // returns NaN | ||
| * | ||
| * @example | ||
| * var y = mean( 1.0, 0.0 ); | ||
| * // returns NaN |
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.
First examples should always showcase valid inputs (this is something that should be addressed in various files).
| // MAIN // | ||
|
|
||
| /** | ||
| * Returns the expected value for a wald distribution with mean `mu` and standard deviation `sigma`. |
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.
| * Returns the expected value for a wald distribution with mean `mu` and standard deviation `sigma`. | |
| * Returns the expected value for a Wald distribution with mean `mu` and standard deviation `sigma`. |
| // MAIN // | ||
|
|
||
| /** | ||
| * Evaluates the expected value for a Wald distribution with mean `mu` and standard deviation `sigma`. |
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.
| * Evaluates the expected value for a Wald distribution with mean `mu` and standard deviation `sigma`. | |
| * Returns the expected value for a Wald distribution with mean `mu` and standard deviation `sigma`. |
Planeshifter
left a comment
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.
As in #9324, the Wald distribution has a second shape parameter lambda and not standard deviation sigma, so this will have to be updated across this PR.
Coverage Report
The above coverage report was generated for the changes in this PR. |
Planeshifter
left a comment
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.
Thanks for the edits!
The PR is currently missing README.md, benchmarks, and also contains extraneous changes to normal/mean that should be reverted.
|
|
||
| If provided `NaN` as any argument, the function returns `NaN`. | ||
|
|
||
| If provided `σ <= 0` or `λ <= 0` the function returns `NaN`. |
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.
| If provided `σ <= 0` or `λ <= 0` the function returns `NaN`. | |
| If provided `μ <= 0` or `λ <= 0` the function returns `NaN`. |
| * @param mu mean | ||
| * @param lambda shape parameter | ||
| * @return expected value |
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.
Descriptions need to be aligned here:
| * @param mu mean | |
| * @param lambda shape parameter | |
| * @return expected value | |
| * @param mu mean | |
| * @param lambda shape parameter | |
| * @return expected value |
Resolves #209
Description
Tests, docs, examples and benchmark is yet to added, pending approval of the core implementation.
Related Issues
This pull request has the following related issues:
Questions
No.
Other
I have used this Wiki page as a reference.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
@stdlib-js/reviewers