Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding Projector: fix knn for non-normalized vectors #6293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
2 participants