-
-
Notifications
You must be signed in to change notification settings - Fork 804
bench: refactor random number generation in stats/base/dists/studentized-range
#5175
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
bench: refactor random number generation in stats/base/dists/studentized-range
#5175
Conversation
--- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
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. |
q = uniform( 0.0, 12.0 ); | ||
r = uniform( 2.0, 20.0 ); | ||
v = uniform( 2.0, 20.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.
Here, q
, r
, and v
should each be a Float64Array
of length 100 and should be initialized in a loop. Reference PRs will help.
q = uniform( 0.0, 12.0 ); | ||
r = uniform( 2.0, 20.0 ); | ||
v = uniform( 2.0, 20.0 ); | ||
y = cdf( q, r, v ); |
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 should still remain in the benchmarking loop, as it is the part being benchmarked.
q = uniform( 0.0, 1.0 ); | ||
y = mycdf( q ); |
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.
Same comment as above and applies throughout the PR.
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.
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.
Yes, considering you are using the correct range for random number generation.
--- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
I have made the changes. Can you please review it. |
lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/benchmark.js
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/studentized-range/quantile/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
p[i] = uniform( 0.0, 1.0 ); | ||
r[i] = uniform( 2.0, 20.0 ); | ||
v[i] = uniform( 2.0, 20.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.
Same comment as above, and applies throughout the PR
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.
Done.
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
Signed-off-by: Harsh <[email protected]>
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.
Just some minor changes; the rest of the PR looks ready for merge. Great work!
lib/node_modules/@stdlib/stats/base/dists/studentized-range/quantile/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/studentized-range/quantile/benchmark/benchmark.js
Show resolved
Hide resolved
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
Hi @anandkaranubc , Can you pls review it. |
On it! |
/stdlib lint-autofix |
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.
Just some minor changes. Rest, the PR looks good!
lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/benchmark.js
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/studentized-range/quantile/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
var isnan = require( '@stdlib/math/base/assert/is-nan' ); | ||
var pkg = require( './../package.json' ).name; | ||
var quantile = require( './../lib' ); | ||
var uniform = require('@stdlib/random/base/uniform'); | ||
var Float64Array = require( '@stdlib/array/float64' ); |
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.
var isnan = require( '@stdlib/math/base/assert/is-nan' ); | |
var pkg = require( './../package.json' ).name; | |
var quantile = require( './../lib' ); | |
var uniform = require('@stdlib/random/base/uniform'); | |
var Float64Array = require( '@stdlib/array/float64' ); | |
var isnan = require( '@stdlib/math/base/assert/is-nan' ); | |
var uniform = require( '@stdlib/random/base/uniform' ); | |
var Float64Array = require( '@stdlib/array/float64' ); | |
var pkg = require( './../package.json' ).name; | |
var quantile = require( './../lib' ); |
Just some rearrangement for consistency.
…f/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
…antile/benchmark/benchmark.js Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Harsh <[email protected]>
/stdlib lint-autofix |
@hrshya Can you also change the title to: bench: refactor random number generation in Make sure you apply backticks around stats/base/dists/studentized-range |
stats/base/dists/studentized-range
@anandkaranubc Done! |
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.
Great work! Time to wait for a maintainer to merge this PR :)
PR Commit Message
Please review the above commit message and make any necessary adjustments. |
Thanks @hrshya for PR and @anandkaranubc for review; much appreciated! |
type: pre_push_report
description: Results of running various checks prior to pushing changes. report:
Resolves #4987
Description
This pull request:
stats/base/dists/studentized-range
#4987Related Issues
This pull request:
stats/base/dists/beta
#4837 bench: refactor random number generation instats/base/dists/hypergeometric
#4955Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers