Skip to main content
. 2021 May 24;19:3058–3068. doi: 10.1016/j.csbj.2021.05.036
Algorithm 1. A pseudocode for the construction of the inter-phase and intra-phase SOM.
1 Generate a random weight vector wx for each node x in the 3x3 SOM.
2 Select a random feature vector as the input vector x'.
3 Calculate the Euclidean distance between the input vector and the weight vector.
4 Identify the node with the smallest Euclidean distance as the BMU.
5 Update the weight vector wx' according to (1).
6 Repeat Steps 2–5 until the maximum number of iterations is met or until the grid shrinks (i.e., the weights converge to local minima).