|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.friend.simulation.AbstractAcceptsInput
ch.unizh.ini.friend.simulation.cells.AbstractCell
ch.unizh.ini.friend.simulation.cells.AbstractSpikingCell
ch.unizh.ini.friend.simulation.cells.IntegrateFireCell
public class IntegrateFireCell
Implementation of a spiking cell with an integrate-and-fire spike mechanism.
The cells sums its inputs at each time step, resulting in a membrane potential
.
If the potential exceeds the threshold
, it is reset on the next update to 0. Calling isSpike()
duing this time step will show
that the cell is emitting a spike. The cell's potential is clamped on the negative side by
the potasium reversal potential
, so that the cell cannot be infinitely inhibited. Thus the cell can recover quickly from massive
inhibition.
The cell has a passive leak to the resting potential (zero) whose time constant is leakTime
.
The analog output
of a spiking neuron is computed as the instantaneous spike rate -- the reciprocal of the time between the last
two spikes. There are three caveats:
SPIKE_RATE_TIME_SCALE
.
This normalization to a time of typically 20ms makes the spike rate typically a number around 1. spikeRateMeasurementWindow
.
maxRate
.
update()
is called.
Updateable
,
Serialized FormField Summary | |
---|---|
protected static float |
INPUT_WEIGHT
The default input weight. |
protected float |
integrationPotential
The currently integrated membrane potential. |
float |
leakTime
The leak time constant in seconds. |
protected float |
maxRate
the maximum spike rate, measured in spikes/ SPIKE_RATE_TIME_SCALE . |
protected boolean |
newSpike
Encodes whether the cell will make a spike after the next update() . |
protected float |
potasiumReversal
Potasium reversal potential. |
protected boolean |
spike
Encodes whether the cell is making a spike now. |
static float |
SPIKE_RATE_TIME_SCALE
spike rate time scale in seconds. |
protected float |
spikeRateMeasurementWindow
spike rate measurement time window in seconds. |
protected float |
threshold
The threshold where the cell will fire. |
Fields inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell |
---|
newValue, value |
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput |
---|
inputs |
Constructor Summary | |
---|---|
IntegrateFireCell()
Creates a new instance with currently no inputs. |
|
IntegrateFireCell(Collection inputs)
Creates a new instance with the given collections of inputs. |
|
IntegrateFireCell(int n)
Creates a new instance with currently no inputs and with the given initial capacity. |
|
IntegrateFireCell(ServesOutput input)
Creates a new instance with the given input. |
Method Summary | |
---|---|
void |
compute(float dt)
Computes the new state of this component of the simulation. |
float |
getLeakTime()
Getter for property leakTime. |
float |
getMaxRate()
Getter for property maxRate. |
float |
getPotasiumReversal()
|
float |
getSpikeRateMeasurementWindow()
Getter for property spikeRateMeasurementWindow. |
float |
getThreshold()
Getter for property threshold. |
boolean |
isSpike()
is the cell making a spike now? |
void |
setLeakTime(float leakTime)
Setter for property leakTime. |
void |
setMaxRate(float maxRate)
Setter for property maxRate. |
void |
setPotasiumReversal(float r)
|
void |
setSpikeRateMeasurementWindow(float spikeRateMeasurementWindow)
Setter for property spikeRateMeasurementWindow. |
void |
setThreshold(float threshold)
Setter for property threshold. |
void |
update()
Updates the actual state to the newly computed - aka double-buffering. |
Methods inherited from class ch.unizh.ini.friend.simulation.cells.AbstractSpikingCell |
---|
factory, factory, factory, factory, getComplexCellInstance, getDSSimpleCellInstance, getEvenSimpleCellInstance, getOddSimpleCellInstance |
Methods inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell |
---|
output |
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput |
---|
averageInputs, cloneObject, connectOneToAll, connectOneToOne, getCollectionInstance, getInput, getInputs, integrateInputs, setInput, setInputs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float leakTime
protected static final float INPUT_WEIGHT
protected float threshold
protected float potasiumReversal
public static final float SPIKE_RATE_TIME_SCALE
AbstractCell.output()
of the cell is the rate of spikes per this time.
This scale can be used to normalize spike rates to near-unity values. (Value is 0.019999999552965164f.)
protected float spikeRateMeasurementWindow
protected boolean spike
protected boolean newSpike
update()
.
protected float integrationPotential
protected float maxRate
SPIKE_RATE_TIME_SCALE
.
Constructor Detail |
---|
public IntegrateFireCell()
public IntegrateFireCell(int n)
n
- Number of initial capacity for inputs.public IntegrateFireCell(Collection inputs)
inputs
- The collection of inputs.public IntegrateFireCell(ServesOutput input)
input
- The input.Method Detail |
---|
public void setPotasiumReversal(float r)
r
- the reversal potential value, default is -0.3potasiumReversal
public float getPotasiumReversal()
potasiumReversal
public void compute(float dt)
AbstractAcceptsInput.integrateInputs()
) are multiplied by the time step dt
and summed to the present potential; the sum is multiplied by
exp(-dt/leakTime
). If the membrane exceeds threshold
it is reset to zero.
The potential is clamped to a miniumum of potasiumReversal
.
If the cell has spiked (gone past threshold), it will show up after the next update()
. This spike will last one cycle.
The spike will not be visible during the present cycle.
The instantaneous spike rate is computed as
float instantaneousRate=SPIKE_RATE_TIME_SCALE/(time-lastSpikeTime+Float.MIN_VALUE); if(instantaneousRate>maxRate) instantaneousRate=maxRate; newValue = rateMeasurementFilter.filter(instantaneousRate,dt);
rateMeasurementFilter
is an instance of LowPassFilter
with time constant spikeRateMeasurementWindow
.
newValue
then becomes the value returned as the cell's AbstractCell.output()
dt
- The time that has passed since the last invocation in seconds.public void update()
update
in interface Updateable
update
in class AbstractCell
public boolean isSpike()
AbstractCell.output()
public float getSpikeRateMeasurementWindow()
public void setSpikeRateMeasurementWindow(float spikeRateMeasurementWindow)
spikeRateMeasurementWindow
- New value of property spikeRateMeasurementWindow.public float getMaxRate()
public void setMaxRate(float maxRate)
maxRate
- New value of property maxRate.public float getThreshold()
public void setThreshold(float threshold)
threshold
- New value of property threshold.public float getLeakTime()
public void setLeakTime(float leakTime)
leakTime
- New value of property leakTime.
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |