Skip to content

Teagum/awesom

Repository files navigation

mypy pylint

Awesom

Self-organizing map framework for Python

import matplotlib.pyplot as plt

from awesom import datasets
from awesom import plot as asp
from awesom.som import IncrementalMap


X, y = datasets.norm_circle(5, 500, 1, radius=4)

som = IncrementalMap((7, 7, X.shape[1]), 100, 0.04, 4)
som.fit(X)

fig, ax = plt.subplots(1, 1)
asp.data_2d(ax, X, y)
asp.wire(ax, som)

SOM wire plot