Giter VIP home page Giter VIP logo

neurons's Introduction

Neurons

This is a simple simulation tool for neuron models.

Currently it supports SRM spiking model and the STDP learning model.

You can find everything on the documentation page.

neurons's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

neurons's Issues

SRM and STDP application to entire dataset

Is there a way where I could use the neuron models to learn the optimal weights using spike trains of an entire dataset? For example, I want to perform classification on the Iris Dataset using Spiking Neural Networks. I have my input and output encoded as spike trains, is there a way to use your model for training the entire dataset, instead of just one point? Thank you!

PSTH plot does not work

When I try to plot a psth diagram as in the Jeffress tutorial, I get the attached error.

psth = plotting.PSTH(spiketrain, binsize=5)
psth.show_plot(neuron_indices=[8, 9, 10])
plt.show()

Machine: Windows 64 bit, Python3

<class 'numpy.ndarray'>
Traceback (most recent call last):
File "jeffress_test1.py", line 41, in
psth.show_plot(neuron_indices=[8, 9, 10])
File \Python34\site-packages\neurons\plo
tting.py", line 72, in show_plot
axis.hist(times, bins, histtype='bar', stacked=True, fill=True, facecolor='g
reen', alpha=0.5, zorder=0)
File \site-packages\matplotlib\axes_axes.py", l
ine 5597, in hist
raise ValueError("x must have at least one data point")
ValueError: x must have at least one data point

Application?

Is it possible to accomplish some application such as pattern recognition using this framework?

Add unsymmetric learning window for STDP.

Would be nice to have an unsymmetric learning window for STDP learning. At the moment there is only the paramater tau, which influences both the left (x<0) and the right (x>0) side.

Fix the Izhikevich model

The Izhikevich model in 'spiking.py' doesn't seem to work right.

I suspect this line: 'I = I + np.sum(w[fired, :], axis=0, keepdims=True)' to be false.

Rewrite pytests

I don't like the way that I implemented the pytests.

Rewrite them in a better way, so that I can use them more easily.

Ideas: Learning and Spiking models as fixtures

Check if the potential exceeds the threshold from below

Also, I notice a mistake in your implementation. I'm not sure, but you could check. At any timestep, if the potential of a neuron exceeds the threshold you let it spike. But it has to spike only once per threshold crossing (previous potential < threshold and current_potential > threshold). Don't you think so?

s = np.array([[1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])

Output:
[[1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0]]

You get a series of consecutive spikes instead of just one.

Rename nu to eta

In the SRM class, please recall the function nu to eta, to be consistent with the documentation for the model.

Add CUDA support for STDP

The idea is to use PyCuda to bring the spiketrain and weight arrays on the GPU and to manipulate it there.

The easiest solution would be to make two classes: One 'SRM_Cuda' in spiking, and 'STDP_Cuda' in learning.py, that take cuda memory references instead of numpy arrays as first argument.

Improve the Plotting API

At the moment the plotting api is pretty inconsistent.

Maybe we can make a unified toolbox out of it, which is easy to handle?

Can we support a threshold for each neuron in SRM?

Until now, the threshhold value for the neurons is unique among all neurons in the SRM model.

Maybe we can define a threshold for each neuron, similar to the way we can define a $t_s$ for each neuron.

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.