Open AWSisco opened 4 years ago
hi Adam,
You get that warning because the current implementation of the bubble
and triangle
functions doesn't center the values properly when sigma is even.
If sigma=1
only the winning node is updated if you use bubble
or triangle
, This strategy is called "winner takes all" (Haykin 1999). With gaussian
and mexican_hat
the neighbours of the winner will still have a small update. If sigma<1
one gaussian
and mexican_hat
will only update the winner but bubble
or triangle
will not work.
Thank so much @JustGlowing. That clears up sigma=1
for me.
However, you say above that bubble
does not center properly when sigma is odd, but I'm still confused since lines 208-211 in minisom.py seem to state that sigma should be odd.
def _bubble(self, c, sigma):
"""Constant function centered in c with spread sigma.
sigma should be an odd value.
"""
My bad, I meant when sigma is even. I also corrected my first answer for future readers.
hi Adam,
You get that warning because the current implementation of the
bubble
andtriangle
functions doesn't center the values properly when sigma is even.If
sigma=1
only the winning node is updated if you usebubble
ortriangle
, This strategy is called "winner takes all" (Haykin 1999). Withgaussian
andmexican_hat
the neighbours of the winner will still have a small update. Ifsigma<1
onegaussian
andmexican_hat
will only update the winner butbubble
ortriangle
will not work.
I trained the model with 'gaussian' and sigma = 0.8,0.6,0.4,0.2, and the results I get are completely different (all other parameters were not changed, and I use the same random seed). How are different values [that are all <1] change the training process?
hi @omerbt small changes in sigma can have big impacts on the results of training even when sigma is kept below 1. It all depends on the size of the map and the data that you have.
Hi, thank you for the answer. just to make sure I get it right - isn't sigma only relevant for the choice of neurons to update in each step?
Yes, sigma is the spread of the neighbourhood function. The bigger sigma, the more bigger the neighbourhood that will be affected by the training step.
So if sigma < 1 implies updating only the winner, then why should I expect different values in that range to lead to different results (since anyway only the winner will be updated)? thanks
If sigma < 1 you don't update only the winner but also other neurons by just a small amount. If you want to update only the winner you can user the triangle function with sigma=1.
great, thanks!
I have a question regarding the bubble neighborhood function and how to interpret the value of sigma. Take the following SOM, for example:
This triggers a warning since
sigma >= y
, and minisom.py does note that sigma should be an odd integer for the bubble neighborhood function but I'm not entirely sure why. Is sigma for the bubble function just the radius from the winning node? E.g., if instead I setsigma = 1
, would that mean just the immediately neighboring nodes of the winner are updated? After sigma decreases to less than 1, is only the winning node updated?Thanks so much for any clarification you can provide!