Hi,
I read the following code and I am wondering about the following proposal.
https://github.com/SofieVG/FlowSOM/blob/1e5650e0ed6a554f3dc96c5f8793202453e94daf/src/som.c#L120-L141
When threshold reaches 1, only the best matching unit is updated. The loop L131-L139 looking for the nearest units below the threshold is useless. Only the calculation of the inner loop L134-L138 is needed with cd being nearest. The code at L128 is a weird shortcut IMHO. With the default parameters (grid xdim = ydim = 10, radius is 6), the gain applies in the last 2 loops out of 10 (rlen = 10).
Let me know if there is something I misunderstood.
Hi, I read the following code and I am wondering about the following proposal. https://github.com/SofieVG/FlowSOM/blob/1e5650e0ed6a554f3dc96c5f8793202453e94daf/src/som.c#L120-L141 When threshold reaches 1, only the best matching unit is updated. The loop L131-L139 looking for the nearest units below the threshold is useless. Only the calculation of the inner loop L134-L138 is needed with
cd
beingnearest
. The code at L128 is a weird shortcut IMHO. With the default parameters (grid xdim = ydim = 10, radius is 6), the gain applies in the last 2 loops out of 10 (rlen = 10). Let me know if there is something I misunderstood.