public class DecodableEnsembleImpl extends PlasticEnsembleImpl implements DecodableEnsemble
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent, VisiblyMutable.NodeRemovedEvent
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,DecodedOrigin> |
myDecodedOrigins |
protected java.util.Map<java.lang.String,DecodedTermination> |
myDecodedTerminations |
myPlasticEnsembleTerminations
myExpandableNodes, myExpandedTerminations
Constructor and Description |
---|
DecodableEnsembleImpl(java.lang.String name,
Node[] nodes,
ApproximatorFactory factory) |
Modifier and Type | Method and Description |
---|---|
Origin |
addDecodedOrigin(java.lang.String name,
Function[] functions,
java.lang.String nodeOrigin,
Network environment,
Probe probe,
float startTime,
float endTime)
Adds an Origin that corresponds to a decoding of the activities of Nodes in this Ensemble.
|
Origin |
addDecodedOrigin(java.lang.String name,
Function[] functions,
java.lang.String nodeOrigin,
Network environment,
Probe probe,
Probe state,
float startTime,
float endTime,
float tau)
Lloyd Elliot's decodable origin for decoding band-limited noise using a psc optimized decoder
|
Origin |
addDecodedOrigin(java.lang.String name,
Function[] functions,
java.lang.String nodeOrigin,
Network environment,
Probe probe,
Termination termination,
float[][] evalPoints,
float transientTime)
Adds an Origin that corresponds to a decoding of the activities of Nodes in this Ensemble.
|
Termination |
addDecodedTermination(java.lang.String name,
float[][] matrix,
float[] tfNumerator,
float[] tfDenominator,
float passthrough,
boolean isModulatory) |
Termination |
addDecodedTermination(java.lang.String name,
float[][] matrix,
float tauPSC,
boolean isModulatory) |
DecodableEnsembleImpl |
clone() |
void |
doneOrigins()
This method can optionally be called after all decoded Origins have been added, in order to free
resources that are needed for adding new decodings.
|
ApproximatorFactory |
getApproximatorFactory() |
DecodedOrigin[] |
getDecodedOrigins()
Used to get decoded origins to give to GPU.
|
DecodedTermination[] |
getDecodedTerminations()
Used to get decoded terminations to give to GPU.
|
TimeSeries |
getHistory(java.lang.String stateName)
Note that the units of TimeSeries' for a given state do not change over time (ie at different
time steps).
|
Origin |
getOrigin(java.lang.String name) |
Origin[] |
getOrigins() |
Termination |
getTermination(java.lang.String name) |
Termination[] |
getTerminations() |
java.util.Properties |
listStates() |
DecodedOrigin |
removeDecodedOrigin(java.lang.String name) |
DecodedTermination |
removeDecodedTermination(java.lang.String name) |
void |
reset(boolean randomize)
Resets each Node in this Ensemble.
|
void |
run(float startTime,
float endTime)
Runs each neuron in the Ensemble.
|
void |
setTime(float time)
Allows subclasses to set the simulation time, which is used to support Probeable.
|
void |
stopProbing(java.lang.String stateName) |
addTasks, getLearning, getPlasticityInterval, getTasks, isPopulationPlastic, setLearning, setPlasticityInterval, setStates, setTasks
addTermination, addTermination, getChildren, getDimension, notifyAboutDeletion, removeTermination, setMode, toScript
addChangeListener, collectSpikes, findCommon1DOrigins, fireVisibleChangeEvent, getCollectSpikesRatio, getDocumentation, getMetadata, getMode, getName, getNodes, getSpikePattern, isCollectingSpikes, redefineNodes, removeChangeListener, removeOrigin, setCollectSpikesRatio, setDocumentation, setMetadata, setName, setSpikePattern
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPlasticityInterval, setPlasticityInterval
collectSpikes, getNodes, getSpikePattern, isCollectingSpikes, redefineNodes
getChildren, getDocumentation, getName, notifyAboutDeletion, setDocumentation, setName, toScript
getMode, setMode
addChangeListener, removeChangeListener
protected java.util.Map<java.lang.String,DecodedOrigin> myDecodedOrigins
protected java.util.Map<java.lang.String,DecodedTermination> myDecodedTerminations
public DecodableEnsembleImpl(java.lang.String name, Node[] nodes, ApproximatorFactory factory) throws StructuralException
name
- Name of the Ensemblenodes
- Nodes that make up the Ensemblefactory
- Source of LinearApproximators to use in decoding outputStructuralException
- if super constructor failspublic Origin addDecodedOrigin(java.lang.String name, Function[] functions, java.lang.String nodeOrigin, Network environment, Probe probe, float startTime, float endTime) throws StructuralException, SimulationException
DecodableEnsemble
addDecodedOrigin
in interface DecodableEnsemble
name
- Name of decodingfunctions
- 1D Functions of time which represent the meaning of the Ensemble output when it runs
in the Network provided (see environment arg)nodeOrigin
- The name of the Node-level Origin to decodeenvironment
- A Network in which the Ensemble runs (may include inputs, feedback, etc)probe
- A Probe that is connected to the named Node-level OriginstartTime
- Simulation time at which to startendTime
- Simulation time at which to finishStructuralException
- May arise in instantiating the OriginSimulationException
- If there is a problem running the simulationDecodableEnsemble.addDecodedOrigin(java.lang.String, ca.nengo.math.Function[], java.lang.String, ca.nengo.model.Network, ca.nengo.util.Probe, float, float)
public Origin addDecodedOrigin(java.lang.String name, Function[] functions, java.lang.String nodeOrigin, Network environment, Probe probe, Termination termination, float[][] evalPoints, float transientTime) throws StructuralException, SimulationException
DecodableEnsemble
addDecodedOrigin
in interface DecodableEnsemble
name
- Name of decodingfunctions
- Functions of input that represent the meaning of Ensemble output when it runs in the
Network provided (see environment arg)nodeOrigin
- The name of the Node-level Origin to decodeenvironment
- A Network in which the Ensemble runs (may include inputs, feedback, etc)probe
- A Probe that is connected to the named Node-level Origintermination
- The Termination through which input is to be applied to the EnsembleevalPoints
- The set of vector inputs that are to be applied at the above TerminationtransientTime
- The amount of time the Network is to run with each input, so that transients die away
(output is averaged over the last 10% of each simulation)StructuralException
- May arise in instantiating the OriginSimulationException
- If there is a problem running the simulationsDecodableEnsemble.addDecodedOrigin(java.lang.String, ca.nengo.math.Function[], java.lang.String, ca.nengo.model.Network, ca.nengo.util.Probe, ca.nengo.model.Termination, float[][], float)
public Origin addDecodedOrigin(java.lang.String name, Function[] functions, java.lang.String nodeOrigin, Network environment, Probe probe, Probe state, float startTime, float endTime, float tau) throws StructuralException, SimulationException
name
- Name of decodingfunctions
- 1D Functions of time which represent the meaning of the Ensemble output when it runs
in the Network provided (see environment arg)nodeOrigin
- The name of the Node-level Origin to decodeenvironment
- A Network in which the Ensemble runs (may include inputs, feedback, etc)probe
- A Probe that is connected to the named Node-level Originstate
- Another probe?startTime
- Simulation time at which to startendTime
- Simulation time at which to finishtau
- Time constantStructuralException
- if origin name is takenSimulationException
- if environment can't runpublic Termination addDecodedTermination(java.lang.String name, float[][] matrix, float tauPSC, boolean isModulatory) throws StructuralException
name
- Unique name for this Termination (in the scope of this Ensemble)matrix
- Transformation matrix which defines a linear map on incoming information,
onto the space of vectors that can be represented by this NEFEnsemble. The first dimension
is taken as matrix rows, and must have the same length as the Origin that will be connected
to this Termination. The second dimension is taken as matrix columns, and must have the same
length as the encoders of this NEFEnsemble. TODO: this is transposed?tauPSC
- Time constant of post-synaptic current decay (all Terminations have
this property but it may have slightly different interpretations depending other properties
of the Termination).isModulatory
- If true, inputs to this Termination do not drive Nodes in the Ensemble directly
but may have modulatory influences (eg related to plasticity). If false, the transformation matrix
output dimension must match the dimension of this Ensemble.StructuralException
- if termination name is takenNEFEnsemble.addDecodedTermination(java.lang.String, float[][], float, boolean)
public Termination addDecodedTermination(java.lang.String name, float[][] matrix, float[] tfNumerator, float[] tfDenominator, float passthrough, boolean isModulatory) throws StructuralException
name
- Unique name for this Termination (in the scope of this Ensemble)matrix
- Transformation matrix which defines a linear map on incoming information,
onto the space of vectors that can be represented by this NEFEnsemble. The first dimension
is taken as matrix rows, and must have the same length as the Origin that will be connected
to this Termination. The second dimension is taken as matrix columns, and must have the same
length as the encoders of this NEFEnsemble. TODO: this is transposed?tfNumerator
- Coefficients of transfer function numerator (see CanonicalModel.getRealization(...)
for details)tfDenominator
- Coefficients of transfer function denominatorpassthrough
- How much should pass through?isModulatory
- Is the termination modulatory?StructuralException
- if termination name is takenNEFEnsemble.addDecodedTermination(java.lang.String, float[][], float[], float[], float, boolean)
public DecodedTermination removeDecodedTermination(java.lang.String name) throws StructuralException
removeDecodedTermination
in interface DecodableEnsemble
name
- Name of an existing termination to removeStructuralException
- if DecodedTermination doesn't existDecodableEnsemble.removeDecodedTermination(java.lang.String)
public DecodedOrigin removeDecodedOrigin(java.lang.String name) throws StructuralException
removeDecodedOrigin
in interface DecodableEnsemble
name
- Name of an existing decoding to removeStructuralException
- if DecodedOrigin doesn't existDecodableEnsemble.removeDecodedTermination(java.lang.String)
public DecodedTermination[] getDecodedTerminations()
public void doneOrigins()
DecodableEnsemble
doneOrigins
in interface DecodableEnsemble
DecodableEnsemble.doneOrigins()
public Origin getOrigin(java.lang.String name) throws StructuralException
getOrigin
in interface Node
getOrigin
in class AbstractEnsemble
name
- Name of an Origin on this NodeStructuralException
- if the named Origin does not existNode.getOrigin(java.lang.String)
public Termination getTermination(java.lang.String name) throws StructuralException
getTermination
in interface Node
getTermination
in class PlasticEnsembleImpl
name
- Name of a Termination onto this NodeStructuralException
- if the named Termination does not existNode.getTermination(java.lang.String)
public Origin[] getOrigins()
getOrigins
in interface Node
getOrigins
in class AbstractEnsemble
Node.getOrigins()
public DecodedOrigin[] getDecodedOrigins()
public Termination[] getTerminations()
getTerminations
in interface Node
getTerminations
in class PlasticEnsembleImpl
Node.getTerminations()
public void run(float startTime, float endTime) throws SimulationException
AbstractEnsemble
run
in interface Node
run
in class PlasticEnsembleImpl
startTime
- simulation time at which running starts (s)endTime
- simulation time at which running ends (s)SimulationException
- if a problem is encountered while trying to runNode.run(float, float)
public void setTime(float time)
time
- Simulation timepublic ApproximatorFactory getApproximatorFactory()
public TimeSeries getHistory(java.lang.String stateName) throws SimulationException
Probeable
getHistory
in interface Probeable
getHistory
in class AbstractEnsemble
stateName
- A state variable nameSimulationException
- if the Probeable does not have the requested stateProbeable.getHistory(java.lang.String)
public java.util.Properties listStates()
listStates
in interface Probeable
listStates
in class AbstractEnsemble
Probeable.listStates()
public void stopProbing(java.lang.String stateName)
stopProbing
in interface Ensemble
stopProbing
in class AbstractEnsemble
public DecodableEnsembleImpl clone() throws java.lang.CloneNotSupportedException
clone
in interface ExpandableNode
clone
in interface Node
clone
in class PlasticEnsembleImpl
java.lang.CloneNotSupportedException
- if clone can't be madepublic void reset(boolean randomize)
AbstractEnsemble
reset
in interface Resettable
reset
in class PlasticEnsembleImpl
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)