Module spherical

Module spherical 

Source
Expand description

Spherical Geometry

Operations on the n-sphere S^n = {x ∈ R^{n+1} : ||x|| = 1}

  • Cyclical patterns: Time-of-day, day-of-week, seasonal data
  • Directional data: Wind directions, compass bearings
  • Normalized embeddings: Common in NLP (unit-normalized word vectors)
  • Angular similarity: Natural for cosine similarity

§Key Operations

  • Geodesic distance: d(x, y) = arccos(⟨x, y⟩)
  • Exponential map: Move from x in direction v
  • Logarithmic map: Find direction from x to y
  • Fréchet mean: Spherical centroid

Structs§

SphericalConfig
Configuration for spherical operations
SphericalSpace
Spherical space operations