Repository

SandroMartens/DBGSOM

DBGSOM

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

7stars

Open github.com

SandroMartens/DBGSOM

DBGSOM

A scikit-learn compatible Python implementation of the Directed Batch Growing Self-Organizing Map for clustering, classification, visualization, and nonlinear projection.

Visit project

Show me a random project

First shared
Jun 17, 2026
HN activity
20

Show HN@MyxirJun 17, 2026

Show HN: Dbgsom: A scikit-learn compatible Self-organizing Map

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!

Community

Hacker News discussion

Loading the thread…