Skip to main content

SADIRE: Sampling from scatter-plot visualizations

SADIRE on MNIST

Scatter plot-based representations of dimensionality reduction (such as t-SNE and UMAP) can help us to understand various patterns in high-dimensional datasets. However, due to the huge size of datasets in practical applications, these representations often result in cluttered layouts. With SADIRE, you can reduce the size of the dataset while preserving the context and structural relations imposed by dimensionality reduction techniques.

Requirements

SADIRE uses a QuadTree for selecting representative data points, we chose Pyqtree for this matter:

Instalation

pip install sadire

Citation

@article{MarcilioJr2020_SADIRE,
  author = "Marcílio-Jr, W. E. and Eler, D. M.",
  year = "2020",
  title = "SADIRE: a context-preserving sampling technique for dimensionality reduction visualizations",
  journal = "Journal of Visualization",
  pages = "999--1013"
}

Usage

SADIRE samples from a 2D representation of a multidimensional dataset. It was designed to preserve the relationship imposed by a dimensionality reduction technique.

Load a dataset and reduce
iris_data = load_iris()

X, y = iris_data.data, iris_data.target
Reduce to 2D
reducer = umap.UMAP(random_state=0)
embedding = reducer.fit_transform(X)
Use SADIRE
import sadire

"""
SADIRE uses the concept of windows to select samples and remove redundancy.
 * alpha is the size of the window
 * beta is the size of each block (or superpixel) in a window

The greater are these parameters, more scattered will be the representative data points. 

Using alpha = 2 or 3 and beta between 4 and 10 works fine for the datasets we have tested.
Please, see the paper for more details.

"""

model = sadire.SADIRE(alpha=1, beta=3)


# SADIRE returns the representative indices
samples = model.fit_transform(embedding)

Example

See SADIRE on the MNIST dataset on top.

Support

Please, if you have any questions feel free to contact me at wilson_jr@outlook.com

Metadata

Release files for sadire 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sadire 0.1.5
File Size Uploaded
sadire-0.1.5.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sadire 0.1.5
File Interpreter ABI Platform
sadire-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / sadire-0.1.5.tar.gz

Download URL sadire-0.1.5.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c8439fba2d7dc2a35efaa855171489ffc14aef6d9ec00af6c431aa8a7ae093b4
BLAKE2b-256 checksum
How to use checksums
f606174c9a651aa62d3581131f8314cb85a4f55e68d567d2a82605fda3456f3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

Release files / sadire-0.1.5-py3-none-any.whl

Download URL sadire-0.1.5-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c08896eaef6a4b9a7f0dcb03b440806bffc6b872073aedfe0535ad6d280e6c5c
BLAKE2b-256 checksum
How to use checksums
22dba22e759cff48f8381e4c7b67c911fe788648536dedb43633a223ce742817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page