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.15.tar.gz (37.7 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.15-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uhg-0.1.15.tar.gz
  • Upload date:
  • Size: 37.7 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.15.tar.gz
Algorithm Hash digest
SHA256 5e98d1a1631cf7e5cc8bb7458b50abab19f5bccefc2e2e5837848e57a04269e2
MD5 1008ed667b3f13813936cde494cc3f38
BLAKE2b-256 5d08d5be71f6b8fc0965de817a946fa5de5a08666b410d7fde173d450543b552

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uhg-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 38.3 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.15-py3-none-any.whl
Algorithm Hash digest
SHA256 71d62acc463572b9fc14deddbc3c126773d57ab04361c9cf78a8856f77fcfaba
MD5 98e765d2ae73fac7f62b74403babb48d
BLAKE2b-256 484ceca8995504bfb9c02e9e55c7aad0c48c3bc5b3b5a16ca0bd944aa95d8b6d

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