Repository navigation
v1.3.0 — 2026-06-19
Breaking Changes
- Removed
pointer_search_radiusparameter — radius hardcoded to 1 (no quality gain at r>1 in fine phase) - Removed
color='pca_rgb'plot option — redundant withlayout='pca'
New Features
cutgauss_phaseparameter (default"fine") — auto-switches to sparse cutgauss kernel in fine phase regardless ofneighborhood_functionneighborhood_cutoffparameter (default3.0) — cutgauss truncation radius, tuned to ~1% kernel value vs. previous hardcoded 2σ (13.5%)- Pre-growth weight smoothing (Kohonen eq. 3.80):
smoothing_steps(default0),smoothing_epsilon(default0.5) — improves topographic error on insertion - Pointer-based BMU search extended to cosine metric (previously Euclidean-only)
- Map growth no longer triggers a full BMU re-scan — reuses prior winners for pointer search
plot()raisesValueErroron unknowncolorvalue instead of silently rendering uncoloured
Bug Fixes
sigma_startdefault decoupled from sample count — was scaling witheffective_max_neurons, causing oscillation that prevented growth past 4 neurons on large low-dimensional datasets (e.g. image pixels); now fixed at1.0transform(): replacedSparseCoderwithscipy.optimize.nnls— prior normalization stripped brightness/magnitude before sparse coding, mixing same-hue different-brightness samples- Cosine metric: restored unit-norm invariant on neuron weights after smoothing and growth (was biasing BMU distances for up to one epoch per growth event)
- Fixed
NameErrorwhenpointer_searchenabled withmetric="cosine"(missingnumba_find_winners_pointer_cosine)
Performance
- Replaced Floyd-Warshall full recompute (
O(K⁴)total) with incrementalO(K²)distance-matrix extension per growth event;_distance_matrixnowint16(8× memory reduction) - Sparse CSR kernel for neighborhood + weight update activates only when sparsity > 90% (small σ / fine phase); dense BLAS stays default in coarse phase
_build_neighbor_matrixreads 1-hop adjacency directly from graph instead of scanning the distance matrix (~3× faster at growth time)
Dependencies
- Added explicit
scipy>=1.10.0dependency (previously transitive via sklearn)
Documentation
CLAUDE.md/ docstrings: documented accuracy vs. performance code paths, corrected complexity analysis (Floyd-Warshall references → incrementalO(K³))- Restructured JOSS paper statement of need, complexity, and growth-stability sections; fixed bibliography and LaTeX escape issues
- Added Sphinx-Gallery image color quantization and chess clustering example notebooks
Full Changelog: v1.2.5...v1.3.0