Skip to main content

Fast visualization of high-dimensional data

Project description

FVHD: Fast Visualization of High-Dimensional Data

FVHD is a Python library for efficient visualization of high-dimensional data using force-directed graph layout algorithms. It provides an implementation of high-dimensional data visualization with neighbor-based force calculations.

Features

  • Fast neighbor search using scikit-learn's NearestNeighbors
  • Force-directed graph layout optimization
  • Support for both optimizer-based and force-directed methods
  • Automatic parameter adaptation
  • Efficient binary graph storage format

Installation

FVHD requires Python 3.12+. We recommend using uv for dependency management:

  1. Install uv (if missing):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Sync dependencies:

    uv sync
    
  3. Run scripts:

    uv run python your_script.py
    

Quick Start

import torch
import pandas as pd
from fvhd import FVHD
from knn import Graph, NeighborConfig, NeighborGenerator

X = torch.rand(1000, 784)
df = pd.DataFrame(X.numpy())

config = NeighborConfig(metric="euclidean")
generator = NeighborGenerator(df=df, config=config)
graph_knn, graph_mutual = generator.run(nn=5)

fvhd = FVHD(
    n_components=2,
    nn=5,
    rn=2,
    c=0.1,
    eta=0.2,
    epochs=3000,
    device="cuda" if torch.cuda.is_available() else "cpu",
    velocity_limit=True,
    autoadapt=True
)

embeddings = fvhd.fit_transform(X, graph=graph_knn)

Example with MNIST

from fvhd import FVHD

fvhd = FVHD(
    n_components=2,
    nn=5,
    rn=2,
    c=0.005,
    eta=0.003,
    epochs=3000,
    device="cuda"
)

embeddings = fvhd.fit_transform(X)

Parameters

  • n_components: Output dimensionality (default: 2)
  • nn: Number of nearest neighbors (default: 2)
  • rn: Number of random neighbors (default: 1)
  • c: Repulsion strength coefficient (default: 0.1)
  • eta: Learning rate (default: 0.1)
  • epochs: Number of optimization epochs (default: 200)
  • device: Computation device ("cpu", "cuda", "mps")
  • autoadapt: Enable automatic learning rate adaptation
  • velocity_limit: Enable velocity limiting for stability

Citation

If you use this software in your research, please cite:

@misc{fvhd2025,
  author = {Minch, Bartosz, Ręka, Filip and Dzwinel, Witold},
  title = {FVHD: Fast Visualization of High-Dimensional Data},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/langMonk/fvhd}
}

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

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

fvhd-0.2.0.tar.gz (54.5 kB view details)

Uploaded Source

Built Distribution

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

fvhd-0.2.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file fvhd-0.2.0.tar.gz.

File metadata

  • Download URL: fvhd-0.2.0.tar.gz
  • Upload date:
  • Size: 54.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fvhd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3b1724dddb4b1b793cd0356015eda48aeecf9814b342bfd6473dff34cc1084df
MD5 ecce7e2053ece761a3f2aabc5b36fdc7
BLAKE2b-256 b26c9a2bbb5ca3506dbdd849df8a4a418c2d42993f257f863e4bb1ca7f204474

See more details on using hashes here.

Provenance

The following attestation bundles were made for fvhd-0.2.0.tar.gz:

Publisher: python-publish.yml on langMonk/FVHD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fvhd-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fvhd-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fvhd-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b53b0ee21bd8127eeeaa60609bbadc38a1d97aeff4515602cbf4fde060e823e2
MD5 0694e17856a1bc59fd60375e29c888a5
BLAKE2b-256 d6befdd4e1fe4591a31f05e44bff5f3478b3efd0a9a78265a8ec9b31715ca3b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for fvhd-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on langMonk/FVHD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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