Skip to main content

This package allows the refinement of DR-based positions with respect to certain data features.

Project description

modDR (modified Dimensionality Reduction)

PyPI version Documentation Status

Modified Dimensionality Reduction (moddr) is a Python package for combining dimensionality reduction techniques with community detection and visualization capabilities. This package presents a method for automatically modifying the positions of data points in low-dimensional spaces based on a feature selection to preserve both global structure and feature-driven similarity. The provided workflow uses graph theory concepts and layout methods to change the arrangement of a given DR-positioning in such a way that an additional similarity measure – based on selected features, for example – is integrated into the distance structure.

Documentation

Full documentation is available at: https://moddr.readthedocs.io

Installation

The package is published on PyPI: https://pypi.python.org/pypi/moddr

Install it via:

pip install moddr

or, if you are using the uv package manager:

uv add moddr

Development

The package was developed with the uv package manager, which is required for local development. After cloning the repository, run the following commands to create a working development environment (if not inside an existing workspace):

uv init project-name
uv sync
uv pip install -e . # needed to make the package functions available locally

You can test the correct local installation by running:

uv run pytest

Quick Start

The package consists of three modules:

  • processing – computing modified embeddings
  • evaluation – computing metrics for evaluation
  • visualization – visualizing embeddings

An instance of the EmbeddingState-class allows you to access all computed information. Examples are available under ./examples as jupyter-notebooks. A minimal example can be implemented as follows. The parameters may have to be adjusted for the used data set, as the default parameters may not be suited.

import moddr

# Run the full moddr pipeline
embeddings = moddr.processing.run_pipeline(
    data=your_data,
    sim_features=your_feature_selection
    verbose=True
)

# Visualize the embeddings
moddr.visualization.display_embeddings(embeddings)

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

moddr-1.0.0.tar.gz (32.2 MB view details)

Uploaded Source

Built Distribution

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

moddr-1.0.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file moddr-1.0.0.tar.gz.

File metadata

  • Download URL: moddr-1.0.0.tar.gz
  • Upload date:
  • Size: 32.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for moddr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 eea80dbcbf1a1b60129056bbf47523bcbed4a91de6bd9f7b5bf2e330423b70e9
MD5 a648f8a030982b804bd55bd03b5a43bf
BLAKE2b-256 56d288b69028d521ed70e218383c9ede96b876838ed084fc1ff73236fd063abc

See more details on using hashes here.

File details

Details for the file moddr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: moddr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for moddr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c594ad94b2104fb6881c4a772981ecf003f146ffb45416e893305152c19d565
MD5 730dcc960e22c42d5432c82eb12cd2e7
BLAKE2b-256 cacba57227c80959e9daf2b9888ce0cf754d195655701d77a42cf723034b7659

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