Skip to content
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: add C implementation for stats/base/dists/normal/cdf #3911

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

manvith2003
Copy link
Contributor

@manvith2003 manvith2003 commented Dec 14, 2024

Resolves ##3771

Description

What is the purpose of this pull request?

This pull request:

  • adds C implementation for @stdlib/stats/base/dists/normal/cdf along with relevant docs, tests, examples and benchmarks.

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

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Dec 14, 2024
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Dec 14, 2024

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/normal/cdf $\color{green}299/299$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}299/299$
$\color{green}+100.00\%$

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

@manvith2003
Copy link
Contributor Author

manvith2003 commented Dec 15, 2024

@Planeshifter @kgryte

I am encountering an issue while running the JavaScript benchmark command for the CDF of a normal distribution.

make benchmark-javascript-files FILES="/Users/pgb/stdlib/lib/node_modules/@stdlib/stats/base/dists/normal/cdf/benchmark/benchmark.native.js"

A similar issue also occurs when running the JavaScript benchmark for the CDF of an arcsine distribution which was the reference PR for the current PR feat: add C implementation for arcsine CDF #3354

Can you please help me resolve this?

@Planeshifter Planeshifter changed the title feat: add C implementation for @stdlib/stats/base/dists/normal/cdf feat: add C implementation for stats/base/dists/normal/cdf Dec 15, 2024
@kgryte
Copy link
Member

kgryte commented Dec 15, 2024

@manvith2003 What is the issue? Can you provide a screenshot? One thing is that you need to have first compiled the package's native add-on before you can run the benchmarks.

@manvith2003
Copy link
Contributor Author

@kgryte

I have first compiled the package's native add-on before running the benchmarks.

Screenshot 2024-12-15 at 6 49 45 PM

@Planeshifter
Copy link
Member

Planeshifter commented Dec 15, 2024

@manvith2003

Sorry for the confusion, the command in the issues is incorrect since it uses a hard-coded path from my system. The correct command is

make benchmark-javascript-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/normal/cdf/benchmark/benchmark.native.js"

so that it uses your current working directory (via pwd). I will be looking into updating the issues with the correct command.

Updated: I (Athan) updated this comment and the suggested command to fix a typo.

@manvith2003
Copy link
Contributor Author

@Planeshifter @kgryte

After the running the new command also encountering same issue

image

@kgryte
Copy link
Member

kgryte commented Dec 16, 2024

@manvith2003 That is because @Planeshifter's suggestion is still incorrect. From the root project directory,

make benchmark-javascript-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/normal/cdf/benchmark/benchmark.native.js"

I suggest studying the other suggested commands next time and seeing what is different. You likely could have deduced the above by examining the paths and seeing what is different from what you were attempting to run.

@manvith2003
Copy link
Contributor Author

@kgryte

Noted, I’ll review more carefully next time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 C implementation for @stdlib/stats/base/dists/normal/cdf
4 participants