KNRscore Documentation

Overview
KNRscore
is a powerful Python package for quantitative comparison of high-dimensional embeddings using a scale-dependent similarity measure. It enables researchers and data scientists to:
Compare different dimensionality reduction techniques (PCA, t-SNE, UMAP, etc.)
Quantify local similarities between embeddings
Evaluate the preservation of neighborhood structures
Visualize comparison results with intuitive plots
Key Features
Scale-dependent Analysis: Compare embeddings at different neighborhood scales
Flexible Input: Works with any embedding or high-dimensional data
Intuitive Visualization: Generate clear comparison plots
Easy Integration: Simple usage with comprehensive documentation
Tip
For a detailed explanation of the methodology, check out our Medium blog post on quantitative comparisons between dimensionality reduction techniques.
Note
Your ❤️ is important to keep maintaining this package. You can support in various ways, have a look at the sponser page. Report bugs, issues and feature extensions at github page.
Quick Start
pip install KNRscore
import KNRscore as knrs
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
# Load example data
X, y = knrs.import_example(data='digits')
# Create embeddings
pca = PCA(n_components=2).fit_transform(X)
tsne = TSNE(n_components=2).fit_transform(X)
# Compare embeddings
scores = knrs.compare(pca, tsne)
# Visualize results
fig, ax = knrs.plot(scores, xlabel='PCA', ylabel='tSNE')
Note
Support the Project: Your support helps maintain and improve this package. Consider:
Starring the repository on GitHub
Reporting issues and suggesting features
Contributing code or documentation
Supporting through GitHub Sponsors
Visit our sponsor page for more ways to contribute.
Documentation Contents
Getting Started
Examples
Usage
Reference