Correlation alignment replaces zero-variance columns with independent noise on each side
- Dominant language
- Python
- Stars
- 130
- Forks
- 48
- Avg merge
- 6h 42m
- Merged PRs (30d)
- 34
Description
`_align_by_correlation` (`nltools/algorithms/alignment/procrustes.py`, `replace_zero_variance=True`) draws independent uniform noise for the reference and the target when it replaces zero-variance columns, so the matched column's assignment in `linear_sum_assignment` is arbitrary rather than deterministic across the pair. The float-conversion fix from #535 (H-06) makes the replacement take effect; the independence of the two draws is a pre-existing wart the S-H verification report and implementer both flagged as out of scope.
Options: draw one noise vector per zero-variance column and reuse it on both sides, or exclude those columns from the assignment and map them last. Needs a decision on the intended semantics; the two existing tests only assert shape and index validity.
Contributor guide
Research direction
Start in nltools/algorithms/alignment/procrustes.py at _align_by_correlation with replace_zero_variance=True, then inspect the two existing tests for shape and index validity. Resolve the intended semantics for zero-variance columns with the maintainers, implement the chosen behavior, and extend the tests to verify deterministic assignment across the pair.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100