We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scanpy has a fast approximate KNN backend option via the transfomer argument for pp.neighbors, which we block at the moment.
pp.neighbors
Adding this can overcome a significant bottleneck for large datasets
The text was updated successfully, but these errors were encountered:
So in a bit more detail:
scanpy allows to use alternative knn backends, see here for a tutorial.
This makes it possible to compute kNN matrices with a default kNN implementation
import scanpy as sc adata = sc.datasets.blobs(n_variables=1000, n_centers=4, n_observations=10000) sc.pp.neighbors(adata)
or with faster backends
import scanpy as sc from sklearn_ann.kneighbors.annoy import AnnoyTransformer adata = sc.datasets.blobs(n_variables=1000, n_centers=4, n_observations=10000) sc.pp.neighbors(adata, transformer=AnnoyTransformer(5))
In ehrapy, the transformer argument is not yet implemented:
transformer
While the default kNN implementation is available
import scanpy as sc adata = sc.datasets.blobs(n_variables=1000, n_centers=4, n_observations=10000) ep.pp.neighbors(adata)
using an sklearn-like Transformer is not supported; having this option can be a speedup for users with large datasets.
# this fails! import ehrapy as ep import scanpy as sc from sklearn_ann.kneighbors.annoy import AnnoyTransformer adata = sc.datasets.blobs(n_variables=1000, n_centers=4, n_observations=10000) ep.pp.neighbors(adata, transformer=AnnoyTransformer(5)) # FAILS
TypeError: neighbors() got an unexpected keyword argument 'transformer'
Sorry, something went wrong.
eroell
nicolassidoux
Successfully merging a pull request may close this issue.
Description of feature
scanpy has a fast approximate KNN backend option via the transfomer argument for
pp.neighbors
, which we block at the moment.Adding this can overcome a significant bottleneck for large datasets
The text was updated successfully, but these errors were encountered: