Skip to main content

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:

Open In Colab

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 P and Q, and UMAP similarity matrices V and W.
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dr_diagnostics-0.3.3.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dr_diagnostics-0.3.3-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

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

Hashes for dr_diagnostics-0.3.3.tar.gz
Algorithm Hash digest
SHA256 01e59369d749c5946b046618345a451e0c77a1760e755331cdcf746d26a12999
MD5 aba77b8050e0c260bdb370cb31540600
BLAKE2b-256 7f754697b3c777ae3d06322df9b6946e1c40122665c984263249cd0c7ee6d9b2

See more details on using hashes here.

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

Hashes for dr_diagnostics-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a396d0a6f14ebc9b13c0f1de2469de69b690efc5b350f93e265979b37375d385
MD5 e45d219d15f1a71e56ef3e0e9999e40b
BLAKE2b-256 30eb884fb81dcb6c926ab7dfd8ff27aef92012b86df0774a0bdbc8394cb4567f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page