question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AlignedUMAP ignores n_components parameter

See original GitHub issue

Hi, 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:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lmcinnescommented, Feb 8, 2021

Maybe now? Sorry about that. It was never really tested with different n_components, so there may still be further issues lurking.

0reactions
lmcinnescommented, Feb 9, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found