lmcinnes / lmcinnes/umap

Precomputed for forward + Non-precomputed metric for inverse_transform

Open
#431 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.3k
Forks
871
Avg merge
1d 13h
Merged PRs (30d)
5

Description

Hello,
Thank you for this awesome library :)

I would like to use a custom metric with UMAP. It's quite fast to compute this metric in a batched way, however it's very slow to just pass it to UMAP which evaluates it at lots of points pairwise unbatched-ly.

I realise I can compute the distance matrix upfront and pass it to UMAP to use, however I would like to be able to use the inverse_transform, which requires a non-precomputed metric.
Is there some way to use the precomputed metric for the forward transform and then change some property to make UMAP use a custom metric for the inverse_transform?

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 reviewing UMAP's forward-transform and inverse_transform entry points, focusing on how each selects and uses the metric. Done means the forward path can use a precomputed metric while inverse_transform can use a non-precomputed custom metric, with the supported usage documented and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.