A Single NeuronΒΆ

Purpose: This demo shows how to construct and manipulate a single neuron.

Comments: This leaky integrate-and-fire (LIF) neuron is a simple, standard model of a spiking single neuron. It resides inside a neural ‘population’, even though there is only one neuron.

Usage: Grab the slider control and move it up and down to see the effects of increasing or decreasing input. This neuron will fire faster with more input (an ‘on’ neuron).

Output: See the screen capture below

../_images/singleneuron.png
Code:
import nef

net=nef.Network('Single Neuron') #Create the network object
input=net.make_input('input',[-0.45]) #Create a controllable input function 
                                      #with a starting value of -.45
neuron=net.make('neuron',1,1,max_rate=(100,100),intercept=(-0.5,-0.5),
    encoders=[[1]],noise=3) #Make 1 neuron, 1 dimension, a max firing 
                            #rate evenly distributed between 100 and 100, 
                            #an x-intercept evenly distributed between -.5 
                            #and -.5, an encoder of 1 and noise at every 
                            #step with a variance of 3 
net.connect(input,neuron) #Connect the input to the neuron
net.add_to_nengo()

Nengo User Manual

Table Of Contents

This Page