Competitive learning (source code)

= Competitive learning
{title2=$\Delta w_k=\eta(x-w_k)$}

Units compete to respond to an input, and the winning unit or sparse winning set strengthens its representation of that input. A prototype update is $w_k\leftarrow w_k+\eta(x-w_k)$ for the winner $k$, with $0<\eta<1$. The winner moves toward the sample: $w_k'-x=(1-\eta)(w_k-x)$. Competition and constraints prevent all units from learning the same unrestricted average.