Skip to content

Conversation

alicialics
Copy link
Contributor

@alicialics alicialics commented Apr 5, 2023

Motivation for features / changes

Fixes #6271
Fixes #5547

Technical description of changes

the reason is that knn expects normalized vectors for cosine distance (cosDistNorm) rather than arbitrary vectors.

Screenshots of UI changes

N/A

Detailed steps to verify changes work correctly (as executed by you)

Alternative repo:

  • Build and launch projector (must be from master, not https://projector.tensorflow.org)
  • Uncheck "Sphereize data" on the default Word2Vec 10k dataset
  • Switch projection from "PCA" to either t-SNE or UMAP
  • See the UI breaks with "Initializing t-SNE..."/"Initialize UMAP..." modal loading forever

Alternate designs / implementations considered

@alicialics alicialics force-pushed the fix_knn_norm branch 3 times, most recently from 3693f34 to d80d1fb Compare April 10, 2023 16:15
@alicialics alicialics changed the title Embedding Projector:knn for non-normalized vectors Embedding Projector: fix knn for non-normalized vectors Apr 13, 2023
@alicialics alicialics marked this pull request as ready for review April 18, 2023 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Embedding Projector: UMAP and TSNE projections broken for embeddings that are not normalized Initializing T-SNE ... TypeError: s[e] is undefined
2 participants