scverse / scverse/scanpy

Access to Diffusion Map methods (and other embedding methods) as Scikit-Learn style API

Open
#3,054 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area – API Needs info❔
Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

What kind of feature would you like to request?

Additional function parameters / changed functionality / changed defaults?

Please describe your wishes

It would be extremely helpful if the embedding manifold tools had scikit-learn style API.

For example, https://pydiffmap.readthedocs.io/en/master/reference/diffusion_map.html

Having the .fit, .transform, and .fit_transform would make the robust implementations in the backend of ScanPy a lot more accessible for users. Right now, the usage feels a bit restrictive and I'm having difficulty leveraging the power of the methods if it's not part of some similar workflow that is in the tutorials.

I'm trying to use the code in the backend of ScanPy implement this API myself but ScanPy is an extremely confusing package from an outside developer. There are nested functions and tests for even simple steps (many of which handle edge cases making the package robust).

More specifically, I'm trying to use the ScanPy implementation of Diffusion Maps as I would use those from pyDiffMap or the spectral clustering from Sklearn.

I would like to be able to fit a model with data. Pickle it. Then transform new samples based on the fitted model. This would provide a useful interface for users looking for a non linear alternative to pca.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the ScanPy implementation of Diffusion Maps and comparing its behavior with the pyDiffMap reference and scikit-learn spectral clustering APIs. Define what fit, transform, fit_transform, pickling, and transforming new samples should mean, then verify the interface against existing ScanPy tutorials and edge-case tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
api, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.