CST 3170 Home Page The Prior Page The Next Page
Middlesex Logo

Lab 8: Self Organising Maps: build a SOM in java.

  1. Open up a new project and make a new class.
  2. Allocate an array of two-dimensional nodes. Initialize them pseudo-randomly.
  3. Similarly, create an array of two-dimensional inputs.
  4. Take the first input and see what node is nearest to it.
  5. Move the node toward the data.
  6. Put this in a loop to repeat for all the inputs.
  7. Print out the modified nodes.
  8. Repeat the process with the learning rate going to zero slowly.
  9. Add a Mexican Hat function so that nodes near the best matching node also move toward the data, and those just a bit further away are pushed away.
  10. Start with actual random nodes.
  11. Try input data in a line, or some other shape.
  12. Plot the results (manually if necessary).
  13. Try 3D nodes and data.