Passing distance matrix in metric="precomputed", what about the data?!
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.3k
- Forks
- 871
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 5
Description
Hello,
I read about issues about passing customized distance function to the UMAP. I realized that we can easily feed the UMAP with the distance matrix instead (#348 ). Right? So, for instance:
my_model = umap.UMAP(metric='precomputed')
my_model_fit = my_model . fit_transform(distance_matrix)
But, what about the data itself? Because two data sets may have the same distance matrix but different locations in the space.
In other words, if two distance matrices are exactly equal to each other, does that mean the overall shape of the data points is the same in the original space? and that's what matters for UMAP?
(NOTE: I should also mention that in the explanation of the argument "metric: string or function (optional, default ‘euclidean’) in the document, I couldn't find the "precomputed" as an eligible input for the metric.)
"
Thanks,
Nima
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #348 and the documentation for UMAP's metric argument and fit_transform entry point. Determine whether precomputed distance matrices are supported as described and what information they preserve, then update the relevant documentation to explain the behavior and include precomputed as an eligible metric if appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100