imfun.som

imfun.som.cluster_map_permutation(affs, perms, shape)

auxiliary function to map affiliations to 2D image

imfun.som.som1(patterns, gridshape=(10, 1), alpha=0.99, r=2.0, neighbor_fn=<function neigh_gauss at 0x7fcac632a050>, fade_coeff=0.9, min_reassign=10, max_iter=100000.0, distance=<function euclidean at 0x7fcac6e1ac80>, init_templates=None, init_pca=False, random_query=True, output='last', verbose=0)

SOM as described in Bacao, Lobo and Painho, 2005 Parameters:

  • patterns – list or array-like, input patterns to train SOM against

  • gridshape – shape of SOM grid

  • alpha – lpha parameter of SOM, “driving” force to adjust

    neighboring nodes

  • r – radius for a neighbor function

  • neighbor_fn – a function to define neighborhood

  • fade_coeff – fading coefficient, parameters alpha and r are

    multiplied at each step

  • min_reassign – stop after number of pattern reassignement has

    reached this value

  • max_iter – don’t do more than this number of iterations

  • distance – distance function (Euclidean distance by default)

  • init_templates – initialize SOM grid with this

  • init_pca – if init_templates is None, initialize templates as

    first N principal components

  • output - string to define output, can be ‘last’, ‘both’ or ‘full’

  • verbose - whether to be verboze