You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that if I run the minisom for twice with 10 epochs every time, it's different from running it for once (after rebooting the jupyter notebook). And it's more similar to run it for once with 20 epochs(after rebooting the jupyter notebook). I'm reading the train function now but I'm still not sure about the reason. The starting_weighs are reset ever time but the result still be affected by the former run.
Here is my code.
pixels = amp_phase_16_column
#SOM initialization and training
print('training...')
som = minisom.MiniSom(4, 4, 16, sigma=1.,
learning_rate=0.9, neighborhood_function='bubble')
som.random_weights_init(pixels)
starting_weights = som.get_weights().copy() # saving the starting weights
som.train(pixels, 200, random_order=True, verbose=True, use_epochs=True)
print('quantization...')
qnt = som.quantization(pixels) # quantize each pixels of the image
print('building new image...')
clustered = np.zeros((*amp_data.shape, 16), dtype=np.float64)
Finally I draw clustered pixel in 'clustered' by heatmap.
The text was updated successfully, but these errors were encountered:
Hi there, not sure I get your question but if you want to be able to replicate your experiments, you need to set random seed to a specific value. The MiniSom constructor takes in it input as random_seed.
I set random_seed=None. I mean if I run minisom for 5 times (10 epochs every time), it should have output 5 similar results separately, but it actually output 5 results that seems like with accumulative weights. And the fifth result is more similar to the result run for 50 epochs.
I found that if I run the minisom for twice with 10 epochs every time, it's different from running it for once (after rebooting the jupyter notebook). And it's more similar to run it for once with 20 epochs(after rebooting the jupyter notebook). I'm reading the train function now but I'm still not sure about the reason. The starting_weighs are reset ever time but the result still be affected by the former run.
Here is my code.
Finally I draw clustered pixel in 'clustered' by heatmap.
The text was updated successfully, but these errors were encountered: