Sparse coding (source code)

= Sparse coding

Represent inputs accurately using few strongly active coefficients, for example by minimizing $\|x-Az\|^2/2+\lambda\sum_i|z_i|$. Learning basis functions on natural images can yield localized oriented filters resembling simple-cell receptive fields. This demonstrates one possible functional account of selectivity, not a proof that cortex implements that exact objective or learning algorithm.