Diagnostics for dimensionality reduction methods such as t-SNE and UMAP
Project description
dr-diagnostics
dr-diagnostics is a Python package for visual diagnostics of dimensionality
reduction embeddings.
It helps users inspect how well a low-dimensional embedding preserves structure from the original high-dimensional data. The package supports user-provided embeddings, as well as built-in workflows for t-SNE and UMAP.
Tutorial
A hands-on tutorial notebook walks through the package on a synthetic dataset (two clusters of different density plus a lone outlier) and shows how the diagnostics reveal density equalisation and outlier absorption:
Installation
Install from PyPI:
pip install dr-diagnostics
Inside a Jupyter notebook or Google Colab cell, prefix the command with !:
!pip install dr-diagnostics
Features
- Visualize original data and low-dimensional embeddings, with optional named class legends.
- Compare high-dimensional and low-dimensional Euclidean distances (distance-fit plots).
- Approximate geodesic distances using a k-nearest-neighbour graph and compare them against low-dimensional Euclidean distances.
- Compute rank matrices from pairwise distance matrices and compare high-dimensional ranks with low-dimensional ranks.
- Trustworthiness and continuity curves over a range of neighbourhood sizes.
- Compare t-SNE similarity matrices
PandQ, and UMAP similarity matricesVandW. - Generate a six-panel dashboard combining the diagnostics in one figure.
- Inspect a single selected point and its k-nearest neighbours across all panels, or a specific pair of points (with automatic detection of the most distorted pairs).
- Show the true 3D scatter of the original data when it is three-dimensional (e.g. the Swiss Roll).
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dr_diagnostics-0.3.3.tar.gz.
File metadata
- Download URL: dr_diagnostics-0.3.3.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01e59369d749c5946b046618345a451e0c77a1760e755331cdcf746d26a12999
|
|
| MD5 |
aba77b8050e0c260bdb370cb31540600
|
|
| BLAKE2b-256 |
7f754697b3c777ae3d06322df9b6946e1c40122665c984263249cd0c7ee6d9b2
|
File details
Details for the file dr_diagnostics-0.3.3-py3-none-any.whl.
File metadata
- Download URL: dr_diagnostics-0.3.3-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a396d0a6f14ebc9b13c0f1de2469de69b690efc5b350f93e265979b37375d385
|
|
| MD5 |
e45d219d15f1a71e56ef3e0e9999e40b
|
|
| BLAKE2b-256 |
30eb884fb81dcb6c926ab7dfd8ff27aef92012b86df0774a0bdbc8394cb4567f
|