connectivity plot values not comparable with UMAP transform output
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.3k
- Forks
- 871
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 5
Description
I would like to add extra information on top of the connectivity plot, but it seems that the connectivity plot values do not correspond to the UMAP transform ?
Here is a reproducible example:
import umap
import umap.plot
from sklearn.datasets import make_classification
X, _ = make_classification()
random_texts = [str(i) for i in range(X.shape[0])]
mapper = umap.UMAP().fit(X)
projected_X = mapper.transform(X)
ax = umap.plot.connectivity(mapper, edge_bundling='hammer')
for x, y, s in zip(projected_X[:,0], projected_X[:,1], random_texts):
ax.text(x, y, s)
break # added this for debug
Expected behavior: The connectivity plot should return an axis which is comparable with the UMAP transform
Or is there any easy way to get the transformation that is applied ?
Thanks!
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 with the reproducible example using umap.plot.connectivity(mapper, edge_bundling='hammer') and mapper.transform(X). Compare the coordinates used by the connectivity plot with projected_X, then trace the transformation applied by connectivity. Done means the plotted axis aligns with the transform output or the required coordinate conversion is clearly exposed and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100