Skip to main content

Geometry-aware ML toolkit for toroidal manifolds

Project description

axiom-t2

Geometry-aware ML toolkit for toroidal manifolds

Standard spatial machine learning algorithms (like KDE, DBSCAN, and LOF) assume a flat Euclidean metric. When applied to cyclic dimensions like Earth's surface (longitude/latitude), standard tools suffer from boundary artefacts (e.g., Dateline tearing) and phase-compression distortions.

axiom-t2 replaces standard Euclidean metrics with exact continuous Toroidal geodesics incorporating continuous Gaussian curvature penalisation.

Installation

pip install axiom-t2

Quick Start

import numpy as np
from axiom.manifold.torus import TorusManifold
from axiom.geodbscan.dbscan import GeoDBSCAN

# Initialise dataset (u: longitude radians, v: latitude radians)
X = np.array([
    [3.14, 0.5], 
    [-3.14, 0.5], # Across the dateline!
    [1.57, -0.2]
])

# Standard DBSCAN splits the first two points.
# GeoDBSCAN connects them across the periodic boundary seamlessly.
model = GeoDBSCAN(eps=0.25, min_pts=2)
model.fit(X)

print(model.labels_)
# Output: [0, 0, -1]

Tools & Algorithms

Tool Euclidean Artefact Fixed Key Result (Validation on Tectonic Earthquakes)
GeoKDE Dateline splits & Polar volume compression Solves density underestimation near the dateline and $K=0$ bands. Log-likelihood significantly improved over Euclidean KDE.
GeoDBSCAN Geographic cluster fracturing Accurately spans Pacific tectonic plates across longitude $\pm 180^\circ$ without splitting.
GeoKNN Nearest-neighbour distortions Provides highly accurate true geographic neighbours across periodic boundaries.
GeoScanner Coordinate volume artefacts Implements MLE surface-area boundary detection over the poloidal dimensions.

(Note: GeoLOF was theoretically evaluated, but experiments showed LOF's inherent density-ratio mathematics are inherently resistant to Cartesian slice artefacts, yielding equivalent performance to Flat LOF).

Domain Presets

The toolkit includes presets tailored for specific topological applications:

# Earth Geography (Standard R=3, r=1 proportion)
manifold = TorusManifold.geographic()

# Financial Market Cycles (R=10, r=1)
manifold = TorusManifold.financial()

# Protein Folding Topology (R=1, r=0.5)
manifold = TorusManifold.protein()

Standalone Packages

Each of the primary geometry-aware algorithms in axiom-t2 can also be installed independently for minimal-dependency deployments:

pip install geokde-t2
pip install geoknn-t2
pip install geodbscan-t2
pip install geoscanner-t2

These standalone packages provide the exact same mathematical properties and use standard imports (e.g., from geokde import GeoKDE).

License

This project is licensed under the Apache License Version 2.0.

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

axiom_t2-0.1.3.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

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

axiom_t2-0.1.3-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file axiom_t2-0.1.3.tar.gz.

File metadata

  • Download URL: axiom_t2-0.1.3.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for axiom_t2-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f8b9ca7b388be6b5f6ade9ecd7ad1ce216f16ae1033560fcc706cac892766b1f
MD5 8609d9fd30c3232296b09f013cae5852
BLAKE2b-256 3c14d15a80b84d01c52e2d08483202289d1b9202da6648ab6b9af022d90a8b81

See more details on using hashes here.

File details

Details for the file axiom_t2-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: axiom_t2-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 32.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for axiom_t2-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 53bbed7f252aa37efcc16d1eee3990c814a39f0f2d6e570d7c7949a335557328
MD5 5dedb6fa7e3968d2a3665b5694d2c3d3
BLAKE2b-256 28d1d71c4d8ca4af028442e7190063e8c2ad5bdffd087d629f0df34d4b699907

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