 <p>A U-matrix is a visual representation of the distances between neurons in the input data dimension space. Namely you calculate the distance between adjacent neurons, using their trained vector. If your input dimension was 4 then each neuron in the trained map corresponds to a 4-dimensional vector. Lets say you have a 3x3 hexagonal map.</p> <p><img src="https://i.stack.imgur.com/XIztZ.png" alt="map lattice"></p> <p>The umatrix will be a 5x5 matrix with interpolated elements for each connection between two neurons like this</p> <p><img src="https://i.stack.imgur.com/8pHtC.png" alt="u-mat lattice"></p> <p>The {x,y} elements are the distance between neuron x and y and the values in {x} elements are the mean of the surrounding values. eg {4,5} = distance(4,5) and {4} = mean({1,4},{2,4},{4,5},{4,7}). For the calculation of the distance you use the trained 4-dimensional vector of each neuron and the distance formula that you used for the training of the map (usually Euclidian distance). So the values of the umat are only numbers (no vectors). Then you can assign a light gray colour to the largest of these values and a dark gray to the smallest and the other values to corresponding shades of gray. You can use these colours to paint the cells of the umat and have a visualized representation of the distances between neurons.</p> <p><a href="http://users.ics.aalto.fi/jhollmen/dippa/node24.html" rel="nofollow noreferrer">check also this</a></p>