AlignedUMAP ignores n_components parameter
See original GitHub issueHi, AlignedUMAP produces a sequence of 2-dimensional embeddings regardless of the n_components’ parameter value. Here’s some code taken from this page to demonstrate this.
import numpy as np
import sklearn.datasets
import umap
import umap.plot
import umap.utils as utils
import umap.aligned_umap
digits = sklearn.datasets.load_digits()
ordered_digits = digits.data[np.argsort(digits.data.sum(axis=1))]
ordered_target = digits.target[np.argsort(digits.data.sum(axis=1))]
slices = [ordered_digits[150 * i:min(ordered_digits.shape[0], 150 * i + 400)] for i in range(10)]
relation_dict = {i+150:i for i in range(400-150)}
relation_dicts = [relation_dict.copy() for i in range(len(slices) - 1)]
aligned_mapper_3D = umap.AlignedUMAP(n_components=3).fit(slices, relations=relation_dicts)
aligned_mapper_3D.embeddings_[0].shape
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to use AlignedUMAP — umap 0.5 documentation
Aligning varying parameters¶. It is possible to align UMAP embedding that vary in the parameters used instead of the data. To demonstrate how...
Read more >umap Documentation - Read the Docs
Uniform Manifold Approximation and Projection (UMAP) is a dimension reduction technique that can be used for.
Read more >Self-supervised deep learning encodes high-resolution ... - NCBI
Protein localization UMAPs are derived after removing each components of our model separately. Aligned UMAPs are given to aid visual comparison.
Read more >Diversity of symptom phenotypes in SARS-CoV-2 ... - arXiv
outdoors mixing, incentives to ignore social distancing, ... the n neighbours parameter to higher values will configure UMAP to focus less ...
Read more >Self-Supervised Deep Learning Encodes High-Resolution ...
Identifying the essential components of our model ... Cells (and their nuclei) that are too close to image edges are ignored.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe now? Sorry about that. It was never really tested with different n_components, so there may still be further issues lurking.
Yes – same bug duplicated into a different portion of code. Hopefully you don’t need update functionality at the moment? Glad that the basic functionality is working for now at least.