The self-organizing map (SOM) is a suitable algorithm for data visualization but its topological preservation makes the vector quantization non-optimal. The SOMNG algorithm aims to improve the lack of quantization precision in the SOM.

SOMNG is a combination of the Self-Organizing Map and the Neural Gas algorithms. An energy cost function based on two different kernels is formulated to obtain a batch algorithm. A bivariate normal distribution is assumed to weight the topological preservation versus the vector quantization. The main properties of SOM and neural gas (NG) are combined to obtain a compact and robust learning rule with an efficient computational complexity. See:

A hybrid batch SOM-NG algorithm. The 2010 International Joint Conference on Neural Networks (IJCNN), pp.1,5, 18-23 July 2010, doi: 10.1109/IJCNN.2010.5596812
Available in: <>

The algorithm also has a supervised version to create local linear models of scalar fields in the defined Voronoi regions. Using visualizing planes, gradients are analyzed to discover the influence of each variable over the output. It does not only allow to select the most relevant variables leading to a better understanding of the data but also to detect different zones of influence, which can be used to create set of fuzzy rules. See:

Detection of locally relevant variables using SOM–NG algorithm. Engineering Applications of Artificial Intelligence 26 - 8, pp. 1992 - 2000. PERGAMON-ELSEVIER SCIENCE LTD, 2013. Available in: <>. ISSN 0952-1976


The algorithm in Matlab source code is available for download here.

Please, if you use it, cite the related work. Thanks!

SOM toolbox is required.

Área de Ingeniería de Sistemas y Automática