docs: clarify method vs transformer in sc.pp.neighbors#4079
Open
CuiweiG wants to merge 3 commits intoscverse:mainfrom
Open
docs: clarify method vs transformer in sc.pp.neighbors#4079CuiweiG wants to merge 3 commits intoscverse:mainfrom
CuiweiG wants to merge 3 commits intoscverse:mainfrom
Conversation
The previous lead stated that kNN search relies on UMAP and bundled that with the choice of connectivity kernel, conflating two stages controlled by independent parameters: ``transformer`` (kNN search backend) and ``method`` (connectivity kernel).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4079 +/- ##
=======================================
Coverage 78.60% 78.60%
=======================================
Files 118 118
Lines 12755 12755
=======================================
Hits 10026 10026
Misses 2729 2729
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Member
|
Thanks, looks good! You marked this as draft, do you plan to make more changes? |
Author
|
Thanks! Nothing more to change — I had it in draft pending feedback. Switching to ready now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
sc.pp.neighborsdocstring bundles the kNN search and theconnectivity kernel into a single lead sentence attributing both to
UMAP. The parameters controlling the two stages are independent:
transformerselects the kNN search backend,methodselects theconnectivity kernel. The lead paragraph and the
method/transformerparameter descriptions obscure this.Change
methodparameter description stating thatthe choice is independent of the kNN search backend.
backend" in the
transformerdescription. The original wordingcontradicted the same block, which already stated that exact kNN
is used for small data.
No signature, default, or behavior change.
Verification
sphinx-build -W --keep-goingproduces 0 new warnings; all fourcitations (McInnes2018, Coifman2005, Haghverdi2016, Levine2015)
resolve; both
:class:cross-references resolve.pre-commit run --all-files: 15/15 hooks pass.pytest tests/test_neighbors.py tests/test_neighbors_common.py tests/test_neighbors_key_added.py: 36 passed.Closes #277.