Git Product home page Git Product logo

pyera's Introduction

What is pyERA?

pyERA is a python implementation of the Epigenetic Robotic Architecture (ERA). It can be used to create single SOMs or more complex systems interconnected with Hebbian weights. The main features of this library can be summarized as follow:

  • Estremely lightweight
  • Self-contained, the only external library required is numpy
  • Standalone classes for Self-Organizing Maps and Hebbian Leaning
  • It provides utilities for decaying learning rate and radius
  • Well documented, different examples are provided
  • Open source (MIT License)

Because the different modules are standalone you can use pyERA for building SOM using only the som.py class. Feel free to fork the project and add your own stuff. Any feedback is appreciated.

What is a Self-Organizing Map?

A Self-Organizing Map (SOM) is a type of artificial neural network that is trained using unsupervised learning to produce a low-dimensional (typically two-dimensional), discretized representation of the input space of the training samples, called a map. SOMs are different from other artificial neural networks as they apply competitive learning as opposed to error-correction learning (such as backpropagation with gradient descent), and in the sense that they use a neighborhood function to preserve the topological properties of the input space [wiki]

What is ERA?

The Epigenetic Robotic Architecture (ERA) is a hybrid behavior-based robotics and neural architecture purposely built to implement embodied principles in cognitive development. This architecture has been already tested in a variety of cognitive and developmental tasks directly modeling child psychology data. The ERA architecture uses a behaviour-based subsumption mechanism to handle the integration of competing sensorimotor input. The learning system is based on an ensemble of pre-trained SOMs connected via Hebbian weights. The basic unit of the ERA architecture is formed by the structured association of multiple self-organizing maps. Each SOM receives a subset of the input available to that unit and is typically partially prestabilized using random input distributed across the appropriate ranges for those inputs. In the simplest case, the ERA architecture comprises of multiple SOMs, each receiving input from a different sensory modality, and each with a single winning unit. Each of these winning units is then associated to the winning unit of a special โ€œhubโ€ SOM using a bidirectional connection weighted with positive Hebbian learning.

In some cases, one of the existing input SOMs can be selected as the hub but more often the hub SOM will provide pattern recognition over the activity of the other SOMs in the ERA unit. Having established the winning units in the various SOMs via a forward pass, the activity within the ERA unit then spreads via the bidirectional Hebbian connections, allowing the presence of features or concepts in one map to prime features or concepts in the other maps/conceptual spaces. For more information about the architecture see the reference section at the bottom of this page.

Installation

Download the repository from [here] or clone it using git:

git clone https://github.com/mpatacchiola/pyERA.git

To install the package you have to run the setup.py script (it may require root privileges):

python setup.py install

Done! pyERA is installed and ready to be used. Give a look to the examples folder. The examples work without any intervention on the code. The only thing you need to do is to open a new terminal and set the examples folder as current directory:

cd pyERA/examples/

The examples require matplotlib (for the visualization of the results), which can be installed from terminal:

sudo apt-get install python-matplotlib

Examples

  • How to save and load a Self-Organizing Map [code]

  • How to train a Self-Organizing Map to classify pixel locations [code] [video]

  • How to pre-train a Self-Organizing Map to classify six different RGB colors [code] [video]

  • How to visualize the Euclidean distance between input vector and weights of a Self-Organizing Map [code] [video] [wiki]

References

Morse, A. F., De Greeff, J., Belpeame, T., & Cangelosi, A. (2010). Epigenetic robotics architecture (ERA). IEEE Transactions on Autonomous Mental Development, 2(4), 325-339. [pdf]

pyera's People

Contributors

mpatacchiola avatar

Watchers

 avatar  avatar

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.