Skip to content

test: migrate stats/incr/pcorrdistmat to ULP-based assertions - #14927

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-pcorrdistmat
Sep 4, 2026
Merged

test: migrate stats/incr/pcorrdistmat to ULP-based assertions#14927
kgryte merged 1 commit into
developfrom
kgryte/ulp-pcorrdistmat

Conversation

@kgryte

@kgryte kgryte commented Sep 3, 2026

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

Final ULP constants:

Test ULP bound
...correlation distance matrix (order) 0
...correlation distance matrix (distance matrix) 0
...correlation distance matrix (order, means) 1
...correlation distance matrix (distance matrix, means) 1

These are the measured minimums. Starting from a high bound and tightening, the maximum ULP difference over the full set of hard-coded Julia-derived expected values is exactly 0, 0, 1, and 1, respectively. The two unknown-means tests are exact matches (0 is the floor), and the two known-means bounds were verified to be minimal: lowering either from 1 to 0 produces failing assertions (8 failures in total).

The test data is fully deterministic (hard-coded Float64Array inputs, no PRNG), and the suite was run twice at the final bounds with identical results:

  • test/test.js: 212 passing, 0 failing

make lint-javascript-tests TESTS_FILTER=".*/stats/incr/pcorrdistmat/.*" is clean. This package has no test/test.native.js, so test/test.js is the only changed file.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

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.

The conversion mirrors the sibling package stats/incr/pcorrmat, which has the same four-block test structure and per-block ULP bounds.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code running as an automated task. The tolerance-to-ULP conversion, the search for the minimum ULP bounds, and the local test/lint verification were all performed by Claude Code.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01B1SNYoWzDxPfm4UmswRuZE


Generated by Claude Code

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Good First PR A pull request resolving a Good First Issue. labels Sep 3, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/pcorrdistmat $\\color{green}534/534$
$\\color{green}+100.00\\%$
$\\color{green}45/45$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}534/534$
$\\color{green}+100.00\\%$

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

@kgryte kgryte added the Tests Pull requests specifically adding tests. label Sep 4, 2026
@kgryte
kgryte marked this pull request as ready for review September 4, 2026 05:29
@kgryte
kgryte requested a review from a team September 4, 2026 05:29
@kgryte
kgryte merged commit 0e2106a into develop Sep 4, 2026
63 of 66 checks passed
@kgryte
kgryte deleted the kgryte/ulp-pcorrdistmat branch September 4, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Statistics Issue or pull request related to statistical functionality. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants