lmcinnes / lmcinnes/umap

one dimensional data: Should an error be raised?

Open
#985 0 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

I noticed that you can feed a dataframe with only one feature to `UMAP.fit` and it gives you a two dimensional embedding back.

I know that the intended use case for UMAP is high-dimensions, but to be error prove, would it be good to require 3 and more features in case a two dimensional representation is requested?

If I read the [How UMAP works](https://umap-learn.readthedocs.io/en/latest/how_umap_works.html) section I guess this behaviour is possible due to the graph based algorithm.

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 UMAP.fit entry point and the linked “How UMAP works” documentation to understand the one-feature, two-dimensional case. Determine whether this input should be rejected or remain supported, then define the expected behavior and corresponding validation coverage before proposing a change.

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.