so_magic.som package¶
Submodules¶
so_magic.som.factory module¶
so_magic.som.manager module¶
- class so_magic.som.manager.MapId(dataset_name, n_columns, n_rows, initialization, map_type, grid_type)[source]¶
Bases:
object
- class so_magic.som.manager.MapManager(map_factory=SelfOrganizingMapFactory(trainer=SomTrainer(infer_map=<function infer_map>), subject=<so_magic.utils.notification.Subject object>))[source]¶
Bases:
object
so_magic.som.self_organising_map module¶
- class so_magic.som.self_organising_map.SelfOrganizingMap(som, dataset_name)[source]¶
Bases:
object
- datapoint_coordinates(index)[source]¶
Get the best-matching unit (bmu) coordinates of the datapoint indexed by the input pointer.
Bmu is simply the neuron on the som grid that is closest to the projected-into-2D-space datapoint.
- property grid_type¶
- property height¶
- property nb_clusters¶
- project(datapoint)[source]¶
Compute the coordinates of a (potentially unseen) datapoint.
It is assumed that the codebook has been computed already.
- property type¶
- property visual_umatrix¶
- property width¶
- class so_magic.som.self_organising_map.SomTrainer(infer_map: callable)[source]¶
Bases:
object
- infer_map¶
- so_magic.som.self_organising_map.infer_map(nb_cols, nb_rows, dataset, **kwargs)[source]¶
Infer a self-organizing map from dataset.
initialcodebook = None, kerneltype = 0, maptype = ‘planar’, gridtype = ‘rectangular’, compactsupport = False, neighborhood = ‘gaussian’, std_coeff = 0.5, initialization = None