ValueError: Could not find embedding attribute of umap_object
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.3k
- Forks
- 871
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 5
Description
**DATA = "ue"**
```
array([[ 2. , 2. , 1. , 8.7734375, 4.4960938],
[ 2. , 2. , 1. , 8.7734375, 4.4960938],
[ 3. , 13. , 9. , 24.828125 , 5.75 ],
...,
[ 2. , 10. , 2. , 20.25 , 3.4277344],
[ 2. , 10. , 2. , 20.25 , 3.4277344],
[ 2. , 2. , 1. , 52.15625 , 26.078125 ]],
dtype=float32)
```
**INPUT CODE**
```
# mapper
clusterable_embedding_my = umap.UMAP(
n_neighbors=5,
min_dist=0.0,
n_components=2,
random_state=42,
).fit_transform(ue)
umap.plot.diagnostic(clusterable_embedding_my,
diagnostic_type='neighborhood')
```
**OUTPUT**
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
1 umap.plot.diagnostic(clusterable_embedding_my,
----> 2 diagnostic_type='neighborhood')
~/anaconda3/envs/rapids/lib/python3.7/site-packages/umap/plot.py in diagnostic(umap_object, diagnostic_type, nhood_size, local_variance_threshold, ax, cmap, point_size, background, width, height)
993 """
994
--> 995 points = _get_embedding(umap_object)
996
997 if points.shape[1] != 2:
~/anaconda3/envs/rapids/lib/python3.7/site-packages/umap/plot.py in _get_embedding(umap_object)
156 return umap_object.embedding
157 else:
--> 158 raise ValueError("Could not find embedding attribute of umap_object")
159
160
ValueError: Could not find embedding attribute of umap_object
```
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 at umap.plot.diagnostic and _get_embedding in plot.py, reproducing the call with the array returned by fit_transform. Determine whether that input is supported and make the behavior match the intended API. Done when the diagnostic call no longer raises this embedding-attribute error, with coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100