Skip to content

king2b3/SOFM

Repository files navigation

General SOFM Network


Welcome! This is my overall architecture of a Self Organizing Feature Map.

The code is for the most part pretty modularized.

  • network.py contains the structure of the SOFM network. You can construct the network object in a separate controller file, like MNISTSOFM.py.
  • MNISTSOFM.py or ECG.py acts as a controller, and contains the constructor for the network. It also controls the testing of the trained network, plotting figures, calculating metrics, and saving the trained network.
  • funcs.py acts as the general function library the this project uses. It contains functions to load in the data sets, thresholding weights, etc.
  • plotting.py serves as the function library for plotting various features of the network.
  • metrics.py serves as the function library for generating metrics of the trained network.
  • DataSets contains the data sets that we have used with the network. Some of them are in their basic form, others are zipped due to their size.
  • params.py contains the variable initialization of the trained network. each input / output file is defined here along with the parameters of the network.

The general flow of your controller could be as follows

  1. construct network.py and load data set of your choice. a few sample data sets are located in funcs.py
  2. train the network using the network class. you can define your own parameters or just use the params.py structure. the train function will return a bool of False, which is used in the testing of the network.
  3. save the weights, then test the network. this will generate and save the output map of the trained network according to the testing set.
  4. calculate and plot / output the metrics of the network.

Other usage

You don't need to use a controller for all use cases of the network. If you properly saved the last working version of the network, you can just set up your controller to output the metrics and look at the output plots. You don't need to train for every case. You should at the minimum test the network everytime you want to see any sort of output, just to make sure that the output map is properly stored. Since the training is the overhead, this shouldn't be much of an issue.

Branches

The master branch contains the current working version of the network. It might not be the most up to date version, but it should be a stable version.

The dev branch is my current working framework for the network. If you want to see what I am currently struggling with at the given time, look here. If you want a stable version of the network, I would look at the master branch

Articles using the network

  1. Tutorial: SOFM for the MNIST Dataset - Basem Fouda

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors