diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-14 23:33:37 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-14 23:33:37 +0000 |
| commit | 12c2a37c3ef3a09f1ab0c5ea69b31b433b15f9f6 (patch) | |
| tree | 96f87fc751d709e7faad995619d1beafd6248381 /tests/data | |
| parent | 473ad82b6f4477bbbeeef977e3e9f830f59a9b7f (diff) | |
| download | correlation_rust-main.tar.gz | |
Expose Spearman, so both methods work without a dataset file main
`Spearman` was a private struct, so only `Pearson` could be constructed from outside the crate: a caller that already holds two value vectors -- a request handler, an enrichment step, a test -- could not compute the rank correlation without going through `Compute`, which means writing the dataset to a file and reading the result back out of a CSV. That is why `Pearson` was public and `Spearman` was not, and it is not a distinction worth keeping: the p-value code is the same either way. `Compute` remains the streaming path for a whole dataset. tests/in_memory.rs is an integration test (outside the crate, so it can only use the public surface) covering the three pieces that path needs: both methods in memory, the positional row parser dropping unparseable values together with their x, and the |r|-descending/NaN-last ordering. Also documents `Compute::sorter`, which orders by *signed* r while `custom_float_sorter` -- the one `compute` uses -- orders by magnitude. The two disagree for negative correlations; left as is because it is public API, but no longer silent.
Diffstat (limited to 'tests/data')
0 files changed, 0 insertions, 0 deletions
