Self organizing map algorithm