lmcinnes / lmcinnes/umap

Are umap transformations non-deterministic?

Open
#158 17 comments 2 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

I am trying to use umap to preprocess some data, and I've noticed that the same vector gives a different result according to the number of rows that is being passed to the transformation.

i.e the same row vector A outputs different vector according to the shape of the data (# of rows) being transformed.

# fit umap to data X 
reducer = umap.UMAP().fit(X)
# transform X using reducer 
embedding = reducer.transform(X)
# get subset of X to transform 
embedding_sub = reducer.transform(X[:100,:])
# => I was assuming embedding_sub == embedding[:100, :]
# => but that wasn't the case

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 reproducing the issue with the provided fit and transform calls, comparing transform(X) with transform(X[:100, :]). Then inspect the transformation entry point and related tests to determine whether identical rows should produce identical outputs regardless of batch size; done means the behavior is explained or covered by a confirmed fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.