
The Kohonen Network Implementations 245
update_recall_result();
lvq_cur_state = LVQ_NEXT_PATTERN;
}
}
In the LVQ_WEIGHT_STEP_CHANGE state, the winning neuron’s weight change
increments are calculated according to equation 6.11. The state transitions to the
state
LVQ_WEIGHT_CHANGE. The state handling routine is shown here.
static void lvq_weight_step_change (void)
{
int idx_pn;
for (idx_pn = 0; idx_pn < (lvq.arch.layers[0].size) ; idx_pn++)
{ // loop through the connect weights of the current neurons
lvq.arch.layers[1].neurons[lvq.env.winner].delta_w[idx_pn] =
lvq.arch.layers[0].neurons[idx_pn].out -
lvq.arch.layers[1].neurons[lvq.env.winner].w[idx_pn];
lvq.arch.layers[1].neurons[lvq.env.winner].delta_w[idx_pn] ...