Giter Club home page Giter Club logo

kohonen-space-mapping's Introduction

Kohonen Space Mapping

Example of Kohonen working as a Self-Organizing Map.

The implementation of Kohonen is a modified version of MiniSom. The difference is an exposed method to apply the training in steps to be able to hook up to that and visualize the process.

Setting Up

Create a virtual environment and install all dependencies:

virtualenv .env
source .env/bin/activate
pip install -r requirements.txt

Execution

Kohonen Method

To run the method, the command is:

python main.py -n KOHONEN_SIZE -it ITERATIONS -nd SPACE_POINTS -fig grid|circle|triangle|random-circle -line
  • -n --> Size of the network (n x n)
  • -it --> Number of iterations to use
  • -nd --> Total points to attempt to adjust to (should be perfect square, ie, 25, 36, 49, etc) within the range [-1, 1]
  • -fig --> Point distribution to use.
  • -line --> Enables or disables drawing lines between Kohonen points.

Example call:

python main.py -n 5 -it 3000 -nd 25 -fig grid 

Image to GIF

To run the method, the command is:

python image_to_gif.py -f FOLDER_PATH -s STEPS_IN_GIF
  • -f --> Path to folder with images
  • -s --> Frames to skip in every iteration, it's the step

Example call:

python image_to_gif.py -f results/5-3000-25 -s 10

Image to Video

To run the method, the command is:

python image_to_video.py -f FOLDER_PATH -s STEPS_IN_GIF -fps VIDEO_FPS
  • -f --> Path to folder with images
  • -s --> Frames to skip in every iteration, it's the step
  • -fps --> FPS for the video

Example call:

python image_to_video.py -f results/5-3000-25 -s 1 -fps 60

kohonen-space-mapping's People

Contributors

gonzalohirsch avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

kohonen-space-mapping's Issues

can you share one of the videos?

Hi there, can you share one of the videos that this code produces? I'd love to share it on twitter as content related to MiniSom.

Thanks for the great work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.