where gji is the ith weight of the jth node nearest to the input vector, xi is the ith element of the
input vector X, and l is the gain constant. Otherwise, a new node is included into the network,
and its weights are determined by the elements of the input feature vector. The index counter
is incremented by one, and the value in the counter is assigned as the index (label) of the
new node.