ca.nengo.model.plasticity.impl
Class AbstractSpikeLearningFunction
java.lang.Object
ca.nengo.math.impl.AbstractFunction
ca.nengo.model.plasticity.impl.AbstractSpikeLearningFunction
- All Implemented Interfaces:
- Function, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- InSpikeErrorFunction, OutSpikeErrorFunction
public abstract class AbstractSpikeLearningFunction
- extends AbstractFunction
Defines the input available to a spike-based learning rule function.
- Author:
- Trevor Bekolay
- See Also:
- Serialized Form
Method Summary |
AbstractSpikeLearningFunction |
clone()
|
protected abstract float |
deltaOmega(float timeSinceDifferent,
float timeSinceSame,
float currentWeight,
float modInput,
int postIndex,
int preIndex,
int dim)
A learning rule that defines how the connection weight changes when
a particular spike happens (either presynaptic spike or postsynaptic). |
float |
getLearningRate()
|
float |
map(float[] from)
Calls deltaOmega. |
void |
setLearningRate(float rate)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myLearningRate
protected float myLearningRate
AbstractSpikeLearningFunction
public AbstractSpikeLearningFunction()
- Ensures that the function is of the correct dimension.
map
public float map(float[] from)
- Calls deltaOmega.
- Specified by:
map
in interface Function
- Specified by:
map
in class AbstractFunction
- Parameters:
from
- Must have same length as getDimension()
- Returns:
- result of function operation on arg
- See Also:
Function.map(float[])
deltaOmega
protected abstract float deltaOmega(float timeSinceDifferent,
float timeSinceSame,
float currentWeight,
float modInput,
int postIndex,
int preIndex,
int dim)
- A learning rule that defines how the connection weight changes when
a particular spike happens (either presynaptic spike or postsynaptic).
- Parameters:
timeSinceDifferent
- The amount of time passed since the last spike
of the different type -- that is, if this is an onInSpike function, it would
be the amount of time since the last out spiketimeSinceSame
- The amount of time passed since the last spike
of the same type -- that is, if this is an onInSpike function, it would
be the amount of time since the last in spikecurrentWeight
- The current connection weight between the pre and post neuronsmodInput
- The modulatory input, for this particular dimension (see dim)postIndex
- The neuron index in the post-synaptic populationpreIndex
- The neuron index in the pre-synaptic populationdim
- The dimension of the modulatory input
clone
public AbstractSpikeLearningFunction clone()
throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interface Function
- Overrides:
clone
in class AbstractFunction
- Throws:
java.lang.CloneNotSupportedException
- See Also:
Object.clone()
setLearningRate
public void setLearningRate(float rate)
- Parameters:
rate
- New learning rate
getLearningRate
public float getLearningRate()