Open access peer-reviewed chapter

Improving Feature Map Quality of SOM Based on Adjusting the Neighborhood Function

By Le Anh Tu

Submitted: May 1st 2019Reviewed: August 18th 2019Published: October 14th 2019

DOI: 10.5772/intechopen.89233

Downloaded: 446


This chapter presents a study on improving the quality of the self-organizing map (SOM). We have synthesized the relevant research on assessing and improving the quality of SOM in recent years, and then proposed a solution to improve the quality of the feature map by adjusting parameters of the Gaussian neighborhood function. We have used quantization error and topographical error to evaluate the quality of the obtained feature map. The experiment was conducted on 12 published datasets and compared the obtained results with some other improving neighborhood function methods. The proposed method received the feature map with better quality than other solutions.


  • quantization error
  • topographical error
  • self-organizing map
  • feature map
  • projection quality
  • learning quality

1. Introduction

SOM is a very useful neural network for visualization and data analysis. Among SOM’s application areas, urban design is a potential area. Many of SOM’s applications can be included in urban design such as: analysis of growth factors in urban design proposal [1], consider urban spatial structure [2], analysis of city systems [3], city data mining [4], predicting accessibility demand for healthcare infrastructure) [5], etc. However, for SOM’s calculation results to be more accurate, improving the quality of feature map is a problem to solve.

SOM creates a map of the input data in the multi-dimensional space to the less dimensional space that is usually two-dimensional space called by the feature map of the data. To evaluate the quality of feature map, people mainly use two indicators: learning quality and projection quality [6, 7, 8, 9]. The learning quality indicator is determined through measurement of quantization error (QE) [10, 11]. The projection quality indicator is determined through measurement of topographical error (TE) [12, 13, 14]. If the values of the QE and TE are small, feature map will be assessed with good quality.

Many studies have shown that the quality of feature map is affected greatly by the initial parameters of the network, including map size, numbers of training and neighborhood radius [11, 15, 16, 17, 18]. Beside that, a feature map achieving with a set of fit parameters is not considered as the best quality map. Therefore, improving the feature map quality of SOM is concerned by many researchers.

To achieve good quality map for each dataset in traditional method is “trying error” with different parameters of the network. These parameters, creating a map with the smallest error measurement are suitable for the dataset [11]. According to Chattopadhyay et al. [19], with a specific dataset, the size of the map is selected by “trying error” until reaching value of QE, TE small enough. Polzlbauer [20] indicates the technical correlation between QE and TE, which TE often arises when QE reduces. In case of increasing the size of Kohonen layer, QE may reduce but TE increases (i.e., the large size of the Kohonen layer can distort the shape of the map), and vice versa when the size of Kohonen layer is too small, TE is not trust. The use of a small neighborhood radius leads to reduced QE. If the neighborhood radius is the smallest value, QE will reach a minimum value [21].

Besides the method of “trying error” to determine a suitable network configuration, the study on improving the algorithm of SOM to enhance the quality of feature map is also interested by researchers. Germen [22, 23] optimized QE by integrating “hit” parameter when updating the weight vector of the neurons, the term “hit” means the number of excitation to a neuron (or BMU counter). The “hit” parameter will determine adjusting weight vector of neuron, i.e., the neurons representing for many samples are adjusted less (to ensure not lose information) than neurons representing for less samples.

Neme [24, 25] proposed SOMSR model (SOM with selective refractoriness), which allows reducing TE. In this model, the neighborhood radius of the BMU did not reduce gradually in the learning process. In every training times, every neuron in the neighborhood radius of the BMU will decide itself whether being affected by the BMU or not in the next training.

Kamimura [26] has integrated the “firing” rate in the distance function to maximize information input. The “firing” rate identifies the important degree of each feature comparing to the remaining features. This method can reduce both QE and TE; however, with each dataset, it needs to “trying error” in several times to determine the appropriate value of “firing.”

Lopez-Rubio [27] describes the topographical error of the map as a state of “self-intersections.” If it detects a “self-intersections” state between neurons after each learning times, it will redo that learning times. This solution can reduce the TE, but increase QE.

Another approach is to adjust the scope and the learning rate of the neighborhood neurons. Kohonen [11] homogenised learning rate of all the neurons in the neighborhood radius to learning rate of the BMU by using the “bubbles” neighborhood function. He concluded that the bubbles function is less effective than the Gaussian function.

Aoki and Aoyagi [28] and Ota et al. [29] published an asymmetric neighborhood function. The essence of this function is extending the neighborhood radius towards one direction and shrinking the opposite one. Theoretically, this could “slide” down the topographical error out of the map. However, his experiment has been limited in the certain situations and not really convinced.

Lee and Verleysen [30] replaced the neighborhood function by “fisherman” rule. “Fisherman” rule updates the neurons in neighborhood radius following the recursive principle, which BMU is adjusted following input sample and the BMU-adjacent neurons (adjacent level 1) is governed by the BMU (unadjusted by input samples), moreover, each adjacent neuron in level 2 is adjusted by the previous adjacent neuron in level 1. The remaining neurons in the neighborhood radius are adjusted in the same rule. However, the way to determine the order of the adjacent neurons when they are organized in a rectangular or a hexagonal grid is not shown in his article. In addition, he concluded that the Gaussian function has better results than the rule of “fisherman”.

It can be recognized that achieving a feature map with good quality according to many criterion is a difficult problem. So far, there has not any solution, reducing simultaneously both QE and TE that is well-applied for every dataset.

In this chapter, we improved Gaussian neighborhood function by adding the adjusting parameter in order to simultaneously reduce the QE, TE of the map. The next contents of the chapter include: Section 2 presents an overview of SOM and assessment measures of the quality of feature map; Section 3 presents our studying on adjusting the parameter of the Gaussian neighborhood function; Section 4 indicates the empirical results and the conclusion of the proposed method.


2. Self-organizing map neural network

2.1 Structure and the algorithm

SOM includes input and output Kohonen layer. Kohonen layer is usually organized under the form of a two-dimensional matrix of neurons. Each unit i(neuron) in the Kohonen layer having a weight vector wi = [wi,1, wi,2, …, wi,n], with nis the size of the input vector; wi,jis the weight vector of neuron igoing with input j(Figure 1). SOM is trained by unsupervised algorithm. The process is repeated many times, at time tdoing three steps:

  • Step 1. Finding BMU: randomly select sample x(t) from dataset (with tis training times), search for a neuron cof the Kohonen matrix containing the minimum distdistance (frequently use functions of Euclidean, Manhattan or vector dot product). Neuron cis called by Best Matching Unit(BMU).

Figure 1.

Illustrates the structure of SOM.


  • Step 2. Calculating neighborhood radius of BMU: using the interpolation function (reduce gradually following the times of iterations)


where Nctis the neighborhood radius in the ttraining time; N0 is initial neighborhood radius; λ=KlogN0is time constant, with Kis the total number of iterations.

  • Step 3. Updates weight vector of neurons in the neighborhood radius of BMU towards being near to sample x(t):


where Ltis the learning rate at the iteration t, (the learning rate is reduced simply along with time similar to neighborhood radius, with 0<Lt<1). Ltcould be a linear function, exponential function …; hcitis a neighborhood function, showing the impact of distance on the learning process calculated by the formula (4)


where rcand riare the positions of neuron cand neuron iin Kohonen matrix.

2.2 The quality of feature map

Quantization error and topographical error are main measurements to assess the quality of SOM. Quantization error is the average difference of the input samples compared to its corresponding winning neurons (BMU). It assesses the accuracy of the represented data, therefore, it is better when the value is smaller [11].


where x(t) is the input sample at the training t; wc(t) is the BMU’s weight vector of sample x(t); Tis total of training times.

Topographical error assesses the topology preservation [13, 14]. It indicates the number of the data samples having the first best matching unit (BMU1) and the second best matching unit (BMU2) being not adjacent. Therefore, the smaller value is better.


where x(t) is the input sample at training times t; d(x(t)) = 1 if BMU1 and BMU2 of x(t) not adjacent, vice versa, d(x(t)) = 0; Tis total of training times.


3. Adding adjust parameter for Gaussian neighborhood function

Formula 3 shows the learning ability of SOM depends on two components: learning rate Ltand neighborhood function hcit.

Because the learning rate decreases simply over time, it should define the general learning rate of SOM over the training time. Therefore, the quality of feature map will be influenced mainly by neighborhood function hcit. The adjustment of the neighborhood function will affect directly to the learning process and the quality of the feature map of SOM.

Neighborhood function hcitdefines the influence level of input sample on neurons in the neighborhood radius Nctof BMU (Figure 2).

Figure 2.

Illustrates the influencing of input sample on the neurons in the neighborhood radius at training times t.

The formula (4) is rewritten in the following general form:


where qand pare two adjustable parameters, with q ≥ 0 và p ≥ 0.

It shows that the value of hcitdepending on the distance from the position of the being assessed neuron (ri) (neuron i) to the position of BMU (rc) and parameters q, p, specifically:

  • If rcri=0(BMU is neuron being assessed), hcit=1.

  • If rcri=Nct(the being assessed neuron in the farthest position in neighborhood radius Nct), the value of the neighborhood function depends on parameter q, with:


The formula (8) shows the minimum value of function hcitdepends on parameter q.

Figure 3 illustrates the neighborhood function hcitin case of the neighborhood radius Nct=10, where p = 2 and q = 0.5, 1, 2, 4, 8, 12.

Figure 3.

Illustrates functionhcitafter changing the value of q.

3.1 Parameter q

In principle, the bigger adjusting level of neurons’s weight vector in the current learning times, the higher their difference with other input patterns in other learning times is. This is the cause of increasing the quantization error. Therefore, to reduce the QE, we must reduce the level and scope of the influencing of input sample, i.e., the increase of the value of qwill reduce QE.

However, if qis too large, the learning ability of the map is restricted, i.e., the topography of map changes less, and partly depends on the initialization of the neural’s weight vector. On the other hand, neighborhood radius Nctcan be shrunk, due to hcit0with neurons in remote positions of neighborhood radius (i.e., neurons in remote positions in the neighborhood radius are not adjusted or adjusted negligibly by input sample). Therefore, to ensure that all the neurons in the neighborhood radius Nctare adjusted by the input sample, the parameter qis not allowed to be too large. For example, the case of q = 8 and 12, function hcit0when the value of rcrireaching to Nct.

In case of q ≈ 0, Gaussian function has the same result as bubble function, i.e., hcit1with all neurons in the neighborhood radius Nct. As a result, if the neighborhood radius Nctis bigger, the feature map will be more likely to change locally following input sample x(t). This reduces the remember ability the previous learning times of the network.

Therefore, TE may depends on initializing the weight vector of neurons if qis too large or depends on the order of the input samples if qis too small. It is notable that the initial weight vector of neurons and the order of the input sample are selected randomly. Therefore, the topographic learning ability of network is best when parameter qis not too small or too large.

3.2 Parameter p

When the parameter qis fixed, if the parameter p increases, the value of function hcitof the neurons that near the BMU will increase gradually to 1, i.e., the number of neighbors around the BMU that are adjusted similar with BMU will extend. This is the cause of QE increasingly. If the parameter pis too large, the feature map tends to change locally according to the input sample from the closest training times (similar to the case that parameter q is too small). However, TE may vary slightly because TE is conducted by BMU1 and BMU2.

Figure 4 illustrates original neighborhood function hcit(with q = 0.5 and p = 2) and adjusted neighborhood function hcit(with q = 4 and p = 1, 2, 3, 4, 5, 6) in case of Nct=10.

Figure 4.

Illustrates functionhcitafter changing the value of p.

In case of p = 1, the graph hcitis similar to the case of q = 8, 12 in Figure 3, i.e., the smallest QE compared to the case of p > 1, but TEis unreliable due to depend on initializing the weight vector of neurons.

Therefore, the adjustment of parameter phas no significant impact on improving the quality of the feature map of SOM, but the parameter qhas positive significance in improving the quality of the feature map of SOM. The bigger the parameter qis, the smaller QEis. However, qreaches the most appropriate value when TEis the smallest. Therefore, we recommend the neighborhood function hci'twith an adjustable parameter as follows:


with the parameter qcan be adjusted depending on each the dataset to achieve better quality of feature map.


4. Experiments

We have conducted experiments for 12 published datasets, including: XOR (data samples are distributed within the XOR operation), Aggregation, Flame, Pathbased, Spiral, Jain, Compound, R15, D31, Iris, Vowel and Zoo. The parameters were used in the experiment as follows: network size: 10 × 10; initial neighborhood radius: 10; initial learning rate: 1; number of training times: 20,000.

The experiments were conducted in two cases: case 1—fixed parameter p, changed parameter q; case 2—fixed parameter q, changed the parameter p.

Note: The results in Tables 1 and 2 are the average value of 10 experiment times. The result of each dataset presented in two rows: the first row shows QEand the second row displays TE.


Table 1.

Experiment results when fixed parameter p = 2, change parameter q.

XOR (q = 1)0.17540.15870.15460.15180.15250.1513
Aggregation (q = 4)2.78953.00033.27223.64363.61003.8718
Flame (q = 4)1.18581.21051.23061.31581.40101.4209
Pathbased (q = 4)2.54582.47592.75862.84622.94002.9928
Spiral (q = 2)3.59763.43193.43343.46033.49263.5797
Jain (q = 4)2.36642.35192.71362.90183.14943.3035
Compound (q = 1)4.20633.75753.62243.49693.50823.4913
R15 (q = 4)1.31611.44061.55441.64981.69721.7376
D31 (q = 4)2.38322.47692.81372.98863.06863.1960
Iris (q = 1)0.71400.63820.61660.60020.58800.5849
Vowel (q = 2)2.39382.37152.41862.43102.45292.4627
Zoo (q = 4)1.18171.09121.17801.19541.20151.2131

Table 2.

Experiment results when change parameter p, fixed parameter q.

Case 1:Parameter pis fixed, parameter qchanged.

Table 1 shows the experimental results with parameter p = 2 and change the value of parameter q = 0.5, 2, 4, 8, 12.

We can see that QEis in a reverse ratio to q, when qis bigger, QEis smaller, while TEreaches the minimum value with q = 1, 2, 4. This is especially true with the proposed analysis in Section 3.

The values in bold are the best results, in which: TEis the smallest, QEis also smaller than the case of using the original neighborhood function (q = 0.5) (column 2, Table 1).

Case 2:Parameter qis fixed, parameter pchanges.

Table 2 shows the experimental results when fixes parameter qof each dataset corresponding to the best value of TEin Table 1 and respectively change the value of p = 1, 2, 3, 4, 5, 6.

When p = 1: both QEand TEincrease high.

When p ≥ 2: TEtends to be stable or increase slightly when prises. This shows that the parameter pis negligibly significance in improving the topographical quality when identifying suitable parameter q; QEtends to increase with the majority of datasets while increasing p(excepting for the dataset XOR, Compound and Iris, QEtends to decrease, but TEtends to increase). This suggests that, p = 2 is the best value.

From Figures 5 to 16 are charts comparing the values of QE, TEwhen changing the parameters qand p, in which: figures on the left (a) are the results when fixing p = 2 and changing q; figures on the right (b) are the results when fixing qand changing p. Parameter qis selected by the corresponding value to achieve the smallest value of TEin figure (a).

Figure 5.

XOR dataset. (a) p = 2 and q changes and (b) q = 1 and p changes.

Figure 6.

Aggregation dataset. (a) p = 2 and q changes and (b) q = 4 and p changes.

Figure 7.

Flame dataset. (a)p = 2 andqchanges and (b)q = 4 andpchanges.

Figure 8.

Pathbased dataset. (a) p = 2 and q changes and (b) q = 4 and p changes.

Figure 9.

Spiral dataset. (a) p = 2 and q changes and b) q = 2 and p changes.

Figure 10.

Jain dataset. (a) p = 2 and q changes and (b) q = 4 and p changes.

Figure 11.

Compound dataset. (a) p = 2 and q changes and (b) q = 1 and p changes.

Figure 12.

R15 dataset. (a) p = 2 and q changes and (b) q = 4 and p changes.

Figure 13.

D31 dataset. (a) p = 2 and q changes and (b) q = 4 and p changes.

Figure 14.

Iris dataset. (a) p = 2 and q changes and (b) q = 1 and p changes.

Figure 15.

Vowel dataset. (a) p = 2 and q changes and (b) q = 2 and p changes.

Figure 16.

Zoo dataset. (a) p = 2 and q changes and (b) q = 4 and p changes.

When putting parameter p = 2 and changing parameter q, we see that the charts are similar (figure (a)—on the left), with QEis reduced gradually, TEreduced at first, then increased inversely with QEwhen parameter qincreased gradually. TEreaches the lowest value when q∈ [10, 28].

When fixing parameter qand changing the parameter p, the charts also have similarities (figure (b)—on the right), including: TEis highest when p = 1; both graphs of QEand TEtend to stabilize or increase gradually with p ≥ 2.

Conclusion:With p = 2 (default value), the adjustment of the parameter qhas significantly impacted on the quality of the feature map. If qis bigger, the QEis smaller. However, TEis lowest when qis not too small or too large. Therefore, with p = 2, parameter qis the most suitable when its value is large enough to achieve the lowest value of TE. Conversely, if we have identified the most appropriate value of the parameter q, the parameter phas little significant impact on improving the quality of the feature map.

Table 3 shows the results of QE, TEwhen using neighborhood function hci't(with parameter p = 2 and qis determined for each dataset shown in Table 2) and some other neighborhood functions. Results show that the neighborhood function hci'tachieved QE, TEsmaller than the original Gaussian function, Bubbles function and asymmetric neighborhood function.

Datasethci(t)h′ci(t)Bubble functionAsymmetric neighborhood function

Table 3.

Compares measures QE, TE of some neighborhood functions.

Note: The results in Table 3 are the average value of 10 experiment times. The result of each dataset present in two rows: the first row shows QEand the second row displays TE.


5. Conclusion

This chapter proposes the parameter for adjustment of the Gaussian symmetric neighborhood function. Our parameter adjusting method can reduce both QEand TEof the feature map. However, the value of parameter must be determined individually for each specific dataset. The improved Gaussian function is better than the original Gaussian function and some other neighborhood functions like Bubble function, asymmetric neighborhood function.

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Le Anh Tu (October 14th 2019). Improving Feature Map Quality of SOM Based on Adjusting the Neighborhood Function, Sustainability in Urban Planning and Design, Amjad Almusaed, Asaad Almssad and Linh Truong - Hong, IntechOpen, DOI: 10.5772/intechopen.89233. Available from:

chapter statistics

446total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Procedure to Prepare and Model Speed Data Considering the Traffic Infrastructure, as Part of a Cyber-Physical System

By José Gerardo Carrillo-González, Jacobo Sandoval-Gutiérrez and Francisco Pérez-Martínez

Related Book

First chapter

Agriculture and Its Impact on Land‐Use, Environment, and Ecosystem Services

By Radoslava Kanianska

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us