trainSOM function

Run the SOM Algorithm