Data Science Collective

Advice, insights, and ideas from the Medium data science community

Member-only story

K-Nearest-Rank Scores: A Tool for Local Structure Analysis in Embeddings

10 min readApr 24, 2025

--

Photo by Saint Rambo on Unsplash

Dimensionality reduction techniques such as PCA, t-SNE, and UMAP are widely used for both feature reduction and visualizing data in lower-dimensional spaces. Being able to visually explore how samples are distributed can reveal key insights that might otherwise remain hidden. However, before relying on these projections, it’s important to ask a few critical questions: 1. How well does the reduced-dimensional space represent the original high-dimensional structure? 2. How consistent are the embeddings generated by PCA, t-SNE, and UMAP with each other? In this blog, I’ll demonstrate how to quantify the similarity between different projections using the K-Nearest-Rank Similarity score (KNR-score).

If you like the content, please give it an applause, and follow me to read my blogs! Also, try the hands-on examples. This will help you to learn quicker, understand better, and remember

--

--

Data Science Collective
Data Science Collective

Published in Data Science Collective

Advice, insights, and ideas from the Medium data science community

Erdogan Taskesen
Erdogan Taskesen

Written by Erdogan Taskesen

Machine Learning | Statistics | D3js visualizations | Data Science | Ph.D | erdogant.github.io

Responses (6)