Back to browse
GitHub Repository

A scikit-learn compatible Python implementation of the Directed Batch Growing Self-Organizing Map

4 starsJupyter Notebook

Dbgsom: A scikit-learn compatible Self-organizing Map

by Myxir·Jun 17, 2026·2 points·0 comments

AI Analysis

●●SolidNiche GemBig Brain

Auto-growing SOM that skips the cluster-count guesswork sklearn forces on you.

Strengths
  • Growing mechanism inserts neurons at boundary positions where error exceeds threshold.
  • Full sklearn API compatibility means drop-in replacement for KMeans or DBSCAN.
  • Batch learning rule trains on all samples per epoch, faster than classical online SOMs.
Weaknesses
  • SOMs are a niche technique with limited modern adoption compared to deep learning.
  • Only 4 GitHub stars suggests limited community validation or real-world usage.
Category
Target Audience

Data scientists and ML engineers using scikit-learn

Similar To

MiniSOM · SOMPY · scikit-learn

Post Description

I've been working on a scikit-learn compatible Self Organizing Map (dbgsom).

I started this project when I learned programming and machine learning at university. Recently I did some benchmarks at it actually does really well against other scikit learn Estimators. It can be used for clustering, classification, visualization and non linear projection in two dimensions.

Might be interesting for a broader Data science audience?

Install:

pip install dbgsom

Example:

from dbgsom import SomClassifier from sklearn.datasets import load_digits

X, y = load_digits(return_X_y=True)

clf = SomClassifier(sigma_end=1, lambda_=30, random_state=42) labels = clf.fit(X, y).predict(X)

print(f"Neurons: {len(clf.neurons_)}") print(f"Quantization error: {clf.quantization_error_:.4f}") print(f"Topographic error: {clf.topographic_error_:.4f}") print(f"Accuracy: {clf.score(X, y):.4f}")

> > Neurons: 92 > > Quantization error: 20.8655 > > Topographic error: 0.0267 > > Accuracy: 0.9416

Github contains more examples and comparisons against scikit-learn (Clustering/Classifiers/Projection) and other SOMs.

Let me know what you think!

Similar Projects

AI/ML●●●Banger

Crforest – Competing-risks RSF in Python, 6× faster than R's rfSRC

Native Python competing-risks RSF that's 6x faster than R's randomForestSrc.

Niche GemSolve My Problem
sunnyadn
101mo ago
DesignPass

Learn about and play with HDR gain maps on the web

It actually does something you don't see every day: run HDR gain-map manipulations client-side with an 'auto HDR' path and an option to derive gain from high-frequency detail so images get that bright, textured sparkle. The site even surfaces HDR diagnostics instead of pretending everything will work — smart UX for a fiddly, display-dependent feature — though the experience will be limited on machines without true HDR support.

Niche GemWizardryEye Candy
thebigsasha
103mo ago