X_eTaL manifolds

The geometry of machine learning, in X_eTaL, a typed array language: small experiments that change the shape of the space a model works in (a representation, a gradient step, a constraint, a flow) and measure what that does.

  • What you are looking at. Each page is a short X_eTaL program running in your browser (WebAssembly). It opens with a question, compares at least two geometric choices on one small machine-learning problem, says what changed in measured numbers, and keeps the mathematics and all the code it runs a click away. A result that says a geometry helped nothing is kept.
  • New here? Start with Manifold tour: what a manifold is and which kinds these pages use.
  • Who it is for. Someone who may know neither geometry nor machine learning nor X_eTaL. Every term opens a plain explanation; every symbol and control is explained, by mouse, keyboard or touch; a surface or a cloud in three dimensions turns, with a flat view and the numbers beside it.
  • Where it comes from. The machine learning is that of X_eTaL-ML's libraries; the pages' shell is shared with X_eTaL-fine-tuning. More X_eTaL: the language, visual demos, games, libraries, extensions, GPUs, FPGAs.
  • Run them yourself. Every experiment at the command line, from a clone.
  • Read the code. The cross-reference (made by xetal doc): every program and library here, its documentation and sections, its source drawn as X_eTaL draws it, every name linked to where it is defined and used.
Manifold tour Live Start here · an introduction

Manifold tour

What a manifold is, on five of them: the circle, the sphere, the torus, the Swiss roll and the Poincare disk, each turning in the browser from X_eTaL's coordinates, with its map beside it and one measurement each of near and far, along the space and through it; and what each is for in the experiments to come.

(p, q) ᵐᶠs̲phereArc 48

The great circle from p to q as 49 points X_eTaL computed; the browser only draws them, turned.

manifoldintrinsic and ambient dimensionlocally flatgeodesicdata manifold
In progress Start here · an introduction

Sphere hello

Six points on the unit sphere: the straight line through it and the great circle along it order every point's neighbors the same way, and the plain average of the points is not on the sphere, where the mean along it is.

ᵐᶠs̲phereMean P

The mean that stays on the sphere, in one call; the plain mean, ('+ r_/ P) / 6.0, is inside it.

manifoldgeodesic distancemean on a manifold
In progress Start here · an introduction

Baseline: nearest neighbors

k nearest neighbors under the straight-line distance on the kit's three data sets (flat clusters, directions, a tree), split the same seeded way, each run's accuracy and cost recorded as the experiment schema says: the row every comparison of H1 is set against, with no geometry chosen yet; and how badly a plain layout of the tree keeps its distances.

(k, train s̲elect X, train s̲elect y) ᵐˡk̲nn held s̲elect X

Learn's nearest neighbors on the held-out quarter, one line; everything else on this page is what was held equal.

nearest neighborsthe experiment kita run's recorddistortion