NeuralInheritanceClass¶
Create neural topology that has an inheritance hierarchy.
-
class
nmcog.spinnaker.associate.nealassoc.makeInheritanceHier.NeuralInheritanceClass(simName='spinnaker', spinnVersion=8)¶ Constants values comments neuronsPerCA10 intraCAWeight0.0085 - 0.01 is hot (every 4 ms)
- 0.005 does not go
hierWeight0.0012 - replaced with 1/2 fsa connection
primeWeight0.017 - 0.016-0.015 threee levels of hier in 75 ms
- 0.02 too big
Methods Argument Caller createNeuralInheritanceHierarchy()- instance of InheritanceReaderClass
NeuralThreeAssocClass createNeurons()- number of neurons
createNeuralInheritanceHierarchy()setRecord()createNeuralInheritanceHierarchy()makeCAs()createNeuralInheritanceHierarchy()makeHiersFromHier()- instance of InheritanceReaderClass
createNeuralInheritanceHierarchy()createTestAllUnits()- initial (first) start time
NeuralThreeAssocClass Note:
- Specifically the instance of InheritanceReaderClass is the base data for NEAL Three-way association function (NEAL3Way). An example base data is
bases = {"units": ["animal", "mammal", "bird", "canary"], "is-a": [ ["canary", "bird"], ["bird", "animal"], ["mammal", "animal"] ]} basedata = InheritanceReaderClass() basedata.numberUnits = len(bases["units"]) basedata.units = bases["units"] basedata.isARelationships = bases["relations"]
-
createNeuralInheritanceHierarchy(inheritanceStructure)¶ Given an instance of InheritanceReaderClass a heirarchy topology is created.
Consider the example for NEAL Three-way association function (NEAL3Way) whose base data is the instance such that,
bases = {"units": ["animal", "mammal", "bird", "canary"], "relations": [ ["canary", "bird"], ["bird", "animal"], ["mammal", "animal"] ]} basedata = InheritanceReaderClass() basedata.numberUnits = len(bases["units"]) basedata.units = bases["units"] basedata.isARelationships = bases["relations"]
Then,
A cell assembly is created for each association unit, i.e. respective assemblies for “animal”, “mammal”, “bird”, and “canary”.
- A cell assembly by default has ten neuron populations. See FSAHelperFunctions
.makeCAfor more detail. - For this example four cell assemblies will be created.
- A cell assembly by default has ten neuron populations. See FSAHelperFunctions
Size of each population in an assembly comprises of some factor of the total number of association units considered. For instance, some factor times the total number of association units. The factor is named
neuronsPerCA.- By default, this is 10 times the total number of units.
- For our example every population in each cell assembly will contain 40 neurons.
Connect (excitatory) cell assemblies among association units that form a “isA” relationship pair.
Therefore, the hierarchy topology is connection among cell assemblies that form a “isA” relationship pair.
What is the practical meaning of the cell assemblies of a “hierarchy topology” in terms of extracting/visualizing the neuron units in a population?
For our example of four base units
["animal", "mammal", "bird", "canary"], i.e. there will be four cell assemblies.By default
neuronsPerCA= 10 (Notice that this value is equal to FSAHelperFunctions.CA_SIZE= 10)Invoking
createNeurons()creates all the neuron units that will make the cell assemblies.createNeurons()creates all the neuron units in one attributeself.cells
After simulating for a particular runtime, spikes from all the neurons (i.e. all neuron units in all the neuronal populations in all the assemblies) by
allspikes = self.cells.get_data( variables=["spikes"] ) - It should be noted that the above ``allspikes`` object is the `Neo Block <https://neo.readthedocs.io/en/latest/api_reference.html#neo.core.Block>`_ - It is a Neo Block with only one `Segment <https://neo.readthedocs.io/en/latest/api_reference.html#neo.core.Segment>`_
Therefore,
Spike trains for all the neuron units in the cell assembly for the base unit “animal” would be.
allspikes.segments[0].spiketrains[0]- That is, spike trains from all the ten neuron units in this cell assembly.
Similarly, for “mammal”, “bird”, and “canary” are respectively
allspikes.segments[0].spiketrains[0]allspikes.segments[0].spiketrains[1]allspikes.segments[0].spiketrains[2]
-
createNeurons(numNeurons)¶ Creates a population of IF_cond_exp neurons with FSAHelperFunctions
.CELL_PARAMS.
-
createSimpleTest()¶ Legacy.
-
createStopAll(stopTimes)¶ Stop all the spikes generated, each generated using
makeGenerator().
-
createTestAllInheritanceUnits(firstTestStart)¶ Legacy.
-
createTestAllUnits(firstTestStart)¶ The state for every cell assembly in the hierarchy topology is turned on. The method returns the time after turning on the state for the last cell assembly.
-
createTestPrimeAllUnits(firstTestStart, numTests)¶ Legacy.
-
makeCAs()¶ Makes
numCAsassemblies of cell, i.e. connect neurons in the population created viacreateNeurons().
-
makeGenerator(genTime)¶ Set up spike generator to start each unit.
genTimeis a float representing the start time.
-
makeHiersFromHier(pythonHier)¶ Makes a hierarchical relationship for each “isA” pair (see above for a
basedataexample). For each “isA” relationship pair cell assemblies of the first element excites those of the second (using FSAHelperFunctions.stateHalfTurnsOnStatewith constant FSAHelperFunctions.HALF_ON_WEIGHT).- Refer to FSAHelperFunctions
.stateHalfTurnsOnStatefor how the cell assemblies are connected.
- Refer to FSAHelperFunctions
-
setRecord()¶ Records spikes of all the neurons in the population created via
createNeurons().