Skip to main content

Universal Hyperbolic Geometry Library for PyTorch

Project description

Universal Hyperbolic Geometry (UHG)

A PyTorch library for hyperbolic deep learning using pure UHG principles.

Features

  • Pure projective geometry implementation
  • No differential geometry or manifold concepts
  • Cross-ratio preservation
  • Projective transformations
  • Graph neural networks
  • Optimizers and samplers

Quick Start

import torch
import uhg

# Create points in projective space
x = torch.randn(10, 3)
y = torch.randn(10, 3)

# Initialize UHG
uhg_proj = uhg.ProjectiveUHG()

# Transform points
x_proj = uhg_proj.transform(x)
y_proj = uhg_proj.transform(y)

# Compute projective distance
dist = uhg_proj.proj_dist(x_proj, y_proj)

# Compute cross-ratio
cr = uhg_proj.cross_ratio(x_proj[0], x_proj[1], x_proj[2], x_proj[3])

Installation

pip install uhg

Documentation

For detailed documentation, visit uhg.readthedocs.io.

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

uhg-0.1.10.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

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

uhg-0.1.10-py3-none-any.whl (44.0 kB view details)

Uploaded Python 3

File details

Details for the file uhg-0.1.10.tar.gz.

File metadata

  • Download URL: uhg-0.1.10.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for uhg-0.1.10.tar.gz
Algorithm Hash digest
SHA256 e4157a040ab80af8a1aca2ee4de3aafacce0a29f3b3484a23fd20385bb79082d
MD5 d9d09f615df7fa089fd6b1eac9368664
BLAKE2b-256 e32c579e4f6ca0947cba0f3acdde73d78160df7766d3cfd045aa62c8ec53e801

See more details on using hashes here.

File details

Details for the file uhg-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: uhg-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 44.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for uhg-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 1340c5aa152e0d36e46dce26ba9cd651588b6e6ae252ee4fefba0f798cde0808
MD5 507a2246d3921915411ba9b306b0163d
BLAKE2b-256 5a0f1aa2303c5b00403acb4a7f612503438aaa2b4c6dbae174032d88c63f954e

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