public abstract class PlasticEnsembleTermination extends EnsembleTermination
A Termination that is composed of Terminations onto multiple Nodes. The dimensions of the Terminations onto each Node must be the same.
Physiologically, this might correspond to a set of n axons passing into a neuron pool. Each neuron in the pool receives synaptic connections from as many as n of these axons (zero weight is equivalent to no connection). Sometimes we deal with this set of axons only in terms of the branches they send to one specific Neuron (a Node-level Termination) but here we deal with all branches (an Ensemble-level Termination). In either case the spikes transmitted by the axons are the same.
TODO: testModifier and Type | Field and Description |
---|---|
protected float[] |
myFilteredInput |
protected float[] |
myFilteredOutput |
protected float[] |
myInput |
protected boolean |
myLearning |
protected float |
myLearningRate |
protected java.lang.String |
myOriginName |
protected float[] |
myOutput |
Constructor and Description |
---|
PlasticEnsembleTermination(Node node,
java.lang.String name,
PlasticNodeTermination[] nodeTerminations) |
Modifier and Type | Method and Description |
---|---|
PlasticEnsembleTermination |
clone(Node node)
Clone method that changes necessary parameters to point to a new parent,
for use in cloning ensembles, etc.
|
float[] |
getFilteredOutput() |
InstantaneousOutput |
getInput() |
boolean |
getLearning() |
float |
getLearningRate() |
java.lang.String |
getOriginName() |
float[] |
getOutputs() |
float[][] |
getTransform() |
void |
modifyTransform(float[][] change,
boolean save,
int start,
int end)
Modifies the transformation weights in-place.
|
void |
reset(boolean randomize) |
void |
saveTransform()
Saves the weights in the PlasticNodeTerminations within.
|
void |
setLearning(boolean learning) |
void |
setLearningRate(float learningRate) |
void |
setOriginName(java.lang.String originName) |
void |
setOriginState(java.lang.String name,
InstantaneousOutput state,
float time) |
void |
setTerminationState(float time) |
void |
setTransform(float[][] transform,
boolean save) |
protected static void |
updateFiltered(float[] raw,
float[] filtered,
float tauPSC,
float integrationTime) |
protected static void |
updateRaw(float[] raw,
InstantaneousOutput state,
float integrationTime) |
abstract void |
updateTransform(float time,
int start,
int end) |
clone, getDimensions, getModulatory, getName, getNode, getNodeTerminations, getTau, setModulatory, setTau, setValues
protected float myLearningRate
protected boolean myLearning
protected java.lang.String myOriginName
protected float[] myOutput
protected float[] myFilteredOutput
protected float[] myInput
protected float[] myFilteredInput
public PlasticEnsembleTermination(Node node, java.lang.String name, PlasticNodeTermination[] nodeTerminations) throws StructuralException
node
- The parent Nodename
- Name of this TerminationnodeTerminations
- Node-level Terminations that make up this Termination. Must be
all LinearExponentialTerminationsStructuralException
- If dimensions of different terminations are not all the samepublic java.lang.String getOriginName()
public void setOriginName(java.lang.String originName)
originName
- Name of Origin from which postsynaptic activity is drawnpublic void setOriginState(java.lang.String name, InstantaneousOutput state, float time) throws StructuralException
name
- Name of Origin from which postsynaptic activity is drawnstate
- State of named origintime
- Current timeStructuralException
- if Origin is not setpublic void setTerminationState(float time) throws StructuralException
StructuralException
protected static void updateRaw(float[] raw, InstantaneousOutput state, float integrationTime) throws StructuralException
StructuralException
protected static void updateFiltered(float[] raw, float[] filtered, float tauPSC, float integrationTime)
public float[][] getTransform()
public void setTransform(float[][] transform, boolean save)
transform
- The transformation matrix, which can be thought of as
the connection weight matrix in most cases. This will be passed through
to set the weight vectors on each PlasticNodeTermination within.public void modifyTransform(float[][] change, boolean save, int start, int end)
change
- The change in the transformation matrixsave
- Whether or not to save the new transformation matrixstart
- Row in transformation matrix to start modificationsend
- Row in transformation matrix to end modificationspublic void saveTransform()
public void reset(boolean randomize)
reset
in interface Resettable
reset
in class EnsembleTermination
randomize
- True indicates that the object should be reset to a
randomly selected initial state (the object must be aware of the
distribution from which to draw from). False indicates that the
object should be reset to a fixed initial state (which it must
also know). Some objects may not support randomization of the initial
state, in which case a fixed state will be used in either case.Resettable.reset(boolean)
public abstract void updateTransform(float time, int start, int end) throws StructuralException
time
- Current timestart
- The start index of the range of transform values to update (for multithreading)end
- The end index of the range of transform values to update (for multithreading)StructuralException
- ifpublic InstantaneousOutput getInput()
getInput
in interface Termination
getInput
in class EnsembleTermination
EnsembleTermination.getInput()
public float[] getOutputs()
public float getLearningRate()
public void setLearningRate(float learningRate)
learningRate
- Learning rate of the terminationpublic boolean getLearning()
public float[] getFilteredOutput()
public void setLearning(boolean learning)
learning
- Turn learning on or off for this terminationpublic PlasticEnsembleTermination clone(Node node) throws java.lang.CloneNotSupportedException
Termination
clone
in interface Termination
clone
in class EnsembleTermination
node
- New parent nodejava.lang.CloneNotSupportedException
- if clone cannot be made