























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!
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。