SOMUniOvi
SOMUniOvi is a simple minimalistic library to train and visualize self-organizing maps (SOM) in python.
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 1 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2020-03-04 |
| Downloads | 0 |
| Last Indexed | 2026-08-11 05:08 |
Tags
Installation
nimble install SOMUniOvi
choosenim install SOMUniOvi
git clone https://gitlab.com/idiazblanco/somuniovi
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| SOMUniOvi | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://gitlab.com/idiazblanco/somuniovi |
|---|---|
| Homepage | https://gitlab.com/idiazblanco/somuniovi |
| Registry Source | gitlab |
README
SOMUniOvi: Self Organizing Map
SOMUniOvi is a simple minimalistic library to train and visualize self-organizing maps (SOM) in python.
Installation and requirements
- Just ensure
somuniovi.pyis accesible in the python module search path - The library and the included examples use
numpyandmatplotlib
Getting Started
To get started head to the ipynb examples provided
Visualizing MNIST with SOM.ipynbVibration and current frequency visual analysis using SOM.ipynbSOM toy example.ipynb
Examples of use
Some code fragments, to have a first glance of library usage. See the ipynb examples for details.
import somuniovi as som
# Create a 50x50 SOM model ...
a = som.SOM(p,dims=(50,50),labels=['var 1','var 2','var 3'])
# PCA (linear) initialization ...
a.pca_init(p)
# Train the SOM ...
a.train(p,N_initial=2,N_final=1,epochs=10,verbose=True)
# plot the SOM component planes after training ...
plt.figure(figsize=(15,7))
ax = a.planes(vmin=-6,vmax=6)
# get projections on the 2D lattice ...
pr = a.fproj(p_test)[0]
# Compute and visualize *u-matrix* ...
d = a.somdist()
fig = plt.figure(figsize=(20,15))
som.planes(d,a.gi,a.dims,labels=['SOM distance map'])
