apollon.som.som module

class apollon.som.som.DotSom(dims=(10, 10, 3), eta=0.8, nh=8, n_iter=10, metric='euclidean', mode=None, init_distr='uniform', seed=None)

Bases: apollon.som.som._som_base

fit(data, verbose=True)
get_winners(data, argax=1)

Get the best matching neurons for every vector in data.

Parameters:
  • data – Input data set
  • argax – Axis used for minimization 1=x, 0=y.
Returns:

Indices of bmus and min dists.

class apollon.som.som.SelfOrganizingMap(dims=(10, 10, 3), eta=0.8, nh=5, n_iter=100, metric='euclidean', mode='incremental', init_distr='simplex', seed=None)

Bases: apollon.som.som._som_base

fit(data, verbose=False)

Train the SOM on the given data set.

predict(data)

Predict a class label for each item in input data. SOM needs to be calibrated in order to predict class labels.

train_batch(data, verbose=False)
Feed the whole data set to the network and update once
after each iteration.
Parameters:
  • data – Input data set.
  • verbose – Print verbose messages if True.
train_incremental(data, verbose=False)
Randomly feed the data to the network and update after each
data item.
Parameters:
  • data – Input data set.
  • verbose – Print verbose messages if True.
train_minibatch(data, verbose=False)