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.11.tar.gz (40.6 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.11-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uhg-0.1.11.tar.gz
  • Upload date:
  • Size: 40.6 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.11.tar.gz
Algorithm Hash digest
SHA256 3b657cf032986bbf14439a3d0cd0c1e9d2b68d570ad8638e5a2f3900553804d6
MD5 53fa05f370ddfe423164e34c4ec0dd52
BLAKE2b-256 9599d786afb0f9b92fb33c10c6408dae9e883d16256f53c5eef418ec2cd81f45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uhg-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 44.1 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 c60a54e84704f0d4cefd29af133c185bf91abea3abddb2191bcc617e58f1d0f3
MD5 14e410651d03cc994563e1e45a870a9d
BLAKE2b-256 30f1e88a249189f71899b33b98ec39d2b7ea4d3713c087d5de06ec8fc933a11f

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