Skip to main content
← Lab

chebabs

confirmedupstream bugPython · MiniSomSystems & data structuresJuly 25, 2026

the question

Does MiniSom's _chebyshev_distance compute the true Chebyshev (L-infinity) distance?

what came out

MiniSom's _chebyshev_distance returns max(x - w), the signed maximum, not max|x - w|. Distances go negative, and the argmin best-matching-unit search then selects the farthest neuron, inverting unit assignment. The manhattan sibling takes absolute values; the fix is max(abs(subtract(x, w))).

method & receipts

  • Result: confirmed
  • Reproducible one script re-runs the whole thing from scratch.
  • Tested — a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/chebabs