Skip to content

Test Neyman distance instead of Pearson - #30

Draft
RealBhupesh wants to merge 1 commit into
mljs:mainfrom
RealBhupesh:fix-neyman-test
Draft

RealBhupesh wants to merge 1 commit into
mljs:mainfrom
RealBhupesh:fix-neyman-test

Conversation

@RealBhupesh

Copy link
Copy Markdown

The Neyman test file currently calls distance.pearson in both tests, so those assertions do not exercise distance.neyman.

This test-only change calls Neyman instead and checks the existing nonzero fixture against 389 / 12, using 12 decimal places. The oracle uses Neyman's first-vector denominator; Pearson gives 149 / 18 for the same fixture. No production code or API changes.

Validation on Node v22.23.4:

  • An isolated, adapted plain-Node check of the two assertions passes with the current Neyman implementation.
  • Changing the denominator to the second vector, or returning zero, makes the nonzero assertion fail. The original test still passes with the wrong-denominator Neyman copy because it calls Pearson instead.
  • This check replaces the Vitest assertion imports and public barrel import with a small local assertion shim and direct metric imports. It is not a Vitest, full-suite, type-check or CI result; those checks were not run.

I used AI assistance to prepare this test change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant