Nengo.ca

ca.nengo.model.nef
Interface DecodableEnsemble

All Superinterfaces:
java.lang.Cloneable, Ensemble, Node, PlasticEnsemble, Probeable, Resettable, java.io.Serializable, SimulationMode.ModeConfigurable, VisiblyMutable
All Known Subinterfaces:
NEFEnsemble
All Known Implementing Classes:
DecodableEnsembleImpl, NEFEnsembleImpl

public interface DecodableEnsemble
extends PlasticEnsemble, Probeable

An Ensemble that produces output signals that mean something when taken together. This meaning can be decoded, as a scalar or vector, through linear combination of the outputs.

Note that NEFEnsemble is a paricularly powerful and efficient special case of DecodableEnsemble. However NEFEnsemble makes some assumptions that can be relaxed by using DecodableEnsemble instead:

  1. It assumes that its Nodes can run in the SimulationMode CONSTANT_RATE
  2. It assumes that activity arises from cosine-tuning to preferred input vectors (all Nodes must be NEFNodes for this reason).


Nested Class Summary
 
Nested classes/interfaces inherited from interface ca.nengo.util.VisiblyMutable
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent, VisiblyMutable.NodeRemovedEvent
 
Method Summary
 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, Termination termination, float[][] evalPoints, float transientTime)
          Adds an Origin that corresponds to a decoding of the activities of Nodes in this Ensemble.
 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.
 DecodedOrigin removeDecodedOrigin(java.lang.String name)
           
 DecodedTermination removeDecodedTermination(java.lang.String name)
           
 
Methods inherited from interface ca.nengo.model.plasticity.PlasticEnsemble
getPlasticityInterval, setPlasticityInterval
 
Methods inherited from interface ca.nengo.model.Ensemble
collectSpikes, getNodes, getSpikePattern, isCollectingSpikes, redefineNodes, stopProbing
 
Methods inherited from interface ca.nengo.model.Node
clone, getChildren, getDocumentation, getName, getOrigin, getOrigins, getTermination, getTerminations, run, setDocumentation, setName, toScript
 
Methods inherited from interface ca.nengo.model.Resettable
reset
 
Methods inherited from interface ca.nengo.model.SimulationMode.ModeConfigurable
getMode, setMode
 
Methods inherited from interface ca.nengo.util.VisiblyMutable
addChangeListener, removeChangeListener
 
Methods inherited from interface ca.nengo.model.Probeable
getHistory, listStates
 

Method Detail

addDecodedOrigin

Origin addDecodedOrigin(java.lang.String name,
                        Function[] functions,
                        java.lang.String nodeOrigin,
                        Network environment,
                        Probe probe,
                        float startTime,
                        float endTime)
                        throws StructuralException,
                               SimulationException
Adds an Origin that corresponds to a decoding of the activities of Nodes in this Ensemble. The decoding is found by running the Ensemble within a Network, and using its output to approximate a vector function of time.

Parameters:
name - Name of decoding
functions - 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 decode
environment - A Network in which the Ensemble runs (may include inputs, feedback, etc)
probe - A Probe that is connected to the named Node-level Origin
startTime - Simulation time at which to start
endTime - Simulation time at which to finish
Returns:
An Origin that approximates the given Functions as a linear combination of output from the given nodeOrigin
Throws:
StructuralException - May arise in instantiating the Origin
SimulationException - If there is a problem running the simulation

addDecodedOrigin

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
Adds an Origin that corresponds to a decoding of the activities of Nodes in this Ensemble. The decoding is found by running the Ensemble repeatedly with different inputs, and using the steady-state output for each input to approximate a vector function of the input. Input is applied to a caller-defined Termination which may or may not be directly onto the Ensemble.

Parameters:
name - Name of decoding
functions - 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 decode
environment - A Network in which the Ensemble runs (may include inputs, feedback, etc)
probe - A Probe that is connected to the named Node-level Origin
termination - The Termination through which input is to be applied to the Ensemble
evalPoints - The set of vector inputs that are to be applied at the above Termination
transientTime - 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)
Returns:
An Origin that approximates the given Functions as a linear combination of output from the given nodeOrigin
Throws:
StructuralException - May arise in instantiating the Origin
SimulationException - If there is a problem running the simulations

doneOrigins

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.


removeDecodedOrigin

DecodedOrigin removeDecodedOrigin(java.lang.String name)
                                  throws StructuralException
Parameters:
name - Name of an existing decoding to remove
Returns:
The removed DecodedOrigin
Throws:
StructuralException - if DecodedOrigin doesn't exist

removeDecodedTermination

DecodedTermination removeDecodedTermination(java.lang.String name)
                                            throws StructuralException
Parameters:
name - Name of an existing termination to remove
Returns:
The removed DecodedTermination
Throws:
StructuralException - if DecodedTermination doesn't exist

Nengo.ca