This SOM classifies the handwritten characters 'N', 'E', 'U', 'R', 'A', 'L', 'S', 'O', and 'M' into a 10x10 lattice. Handwritten characters are provided as 20x16 pixel images.
This repository provides training data, test data, MATLAB codes for training a SOM, testing a SOM, and visualizing a SOM's lattice.
There are no additional/third-party/external dependencies. MATLAB's Neural Network toolbox is not required. MATLAB alone will suffice.
-
som_wts_1.mat and som_labels_1.mat are the weights and neuron labels for an SOM I had trained using train_SOM.m.
![trained SOM lattice](./res_for_readme/trained_som_lattice.jpg)
- **train\_SOM.m** trains an SOM. An SOM is trained with images from SOM\_database.mat by default.
- test_SOM.m tests an SOM. My saved SOM is tested by default. The following screenshot shows the output of test_SOM.m.
- **visualize\_SOM\_lattice.m** visualizes a SOM's lattice like in the picture above. My saved SOM's lattice is visualized by default.
- visualize_dataset.m visualizes the images in SOM_database.mat like in the pictures above.
Run these .m files like how you would regular MATLAB .m files. These .m files were developed on MATLAB R2012a except SOM_database.mat which was likely developed on an older version of MATLAB.
Self Organizing Map, Self-organizing Map, SOM, Self-organizing Feature Map, SOFM, Artificial Neural Network, ANN, unsupervised learning, Kohonen map, Kohonen network, handwriting recognition, MATLAB
These codes were implemented in fulfilment of an assignment (EE5904R Neural Networks Homework #3) from the National University of Singapore (NUS). I do not take credit for the creation of this assignment. I wrote these codes, not the assignment.