NeuralThreeAssocClass

Create a three way association topology.

class nmcog.spinnaker.associate.nealassoc.make3Assoc.NeuralThreeAssocClass(simName='spinnaker', spinnVersion=8)
Methods Argument Caller
createBaseNet() NEAL Three-way association function (NEAL3Way)
createAssociationTopology() NEAL Three-way association function (NEAL3Way)
addAssociations()
  • a structured data
NEAL Three-way association function (NEAL3Way)

Note:

bases = {"units": ["animal", "mammal", "bird", "canary"],
         "is-a": [ ["canary", "bird"], ["bird", "animal"], ["mammal", "animal"] ]}
associate = {"properties": ["food", "fur", "flying", "yellow"], # properties to be associated between base units and its relations
             "relations": ["eats", "likes", "travels", "has", "colored"], # relations associated with properties and base units
             "connections": [ ["animal", "eats", "food"], ["mammal", "has", "fur"], # specific combos of base-props-relations
                              ["bird", "travels", "flying"], ["canary", "colored", "yellow"]] }
addAssociations(assocStructure)

Add associations for each tuple in a data structure of associations by calling addThreeAssoc() for each association.

addThreeAssoc(assocTuple)

Given an association tuple (list of three strings representing base, relation, and property) this method connects

  • The hierarchy topology to the cell assemblies for property.
  • The hierarchy topology to the cell assemblies for relation.
  • The cell assemblies for property to the hierarchy topology.
  • The cell assemblies for property to the cell assemblies for relation.
  • The cell assemblies for relation to the hierarchy topology.
  • The cell assemblies for relation to the cell assemblies for property.
createAssociationTopology(propertyStructure, relationStructure)

Given two instances of UnitReaderClass this method creates cell assemblies (makeCAs()) based on the two neuron populations (createNeurons()).

createBaseNet(baseNodeStructure)

Creates a hierarchy topology for base data. See NeuralInheritanceClass.createNeuralInheritanceHierarchy to know more about hierarchy topology.

createNeurons(numPropertyNeurons, numRelationNeurons)

Creates a two population (propertyCells and relationCells) of IF_cond_exp neurons with FSAHelperFunctions .CELL_PARAMS.

createSimpleTest()

Legacy.

createStopAll(stopTimes, cells, numUnits)

Stop all the spikes generated, each generated using makeGenerator().

createTestAllUnits(firstTestStart, cells, numUnits)

Given a start time firstTestStart, the state for numUnits cell assemblies of a neuron population (cells) is turned on. The method returns the time after turning on the state for the last cell assembly.

createTestPrimeAllBaseUnits(firstTestStart, hierarchy)

.

createTwoPrimeTest(baseNum, propNum, relNum)

.

createTwoPrimeTestPoisson(baseNum, propNum, relNum)

Legacy.

createTwoTest(baseNum, propNum, relNum)

Legacy.

createUnitTests()

Turns on the state for every cell assembly in

  • The hierarchy topology (base data)
  • The populations for propertyCells and relationCells.
makeCAs()

Makes numCAs assemblies of cell, i.e. connect neurons in the two population created via createNeurons().

  • numPropertyCAs assemblies of propertyCells
  • numRelationCAs assemblies of relationCells

Like the “hierarchy topology” created with NeuralInheritanceClass .createNeuralInheritanceHierarchy the practical meaning of the cell assemblies of “property” and “relations” in terms of extracting/visualizing the neuron units in a population is as follows.

  • For our example of four property units ["food", "fur", "flying", "yellow"] there will be four cell assemblies for “property”.

  • For our example of four relation units ["eats", "likes", "travels", "has", "colored"] there will be five cell assemblies for “relation”.

  • By default FSAHelperFunctions .CA_SIZE = 10, which is the number of neuron units in each assembly.

    • This is done by invoking createNeurons()
    • The result is self.propertyCells and self.relationCells
  • 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

allpropertyspikes = self.propertyCells.get_data( variables=["spikes"] )
allrelationspikes = self.relationCells.get_data( variables=["spikes"] )


- It should be noted that the above objects are `Neo Blocks <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 property units “food”, “fur”, “flying”, and “yellow” are respectively

      • allpropertyspikes.segments[0].spiketrains[0] for “food”
      • allpropertyspikes.segments[0].spiketrains[1] for “fur”
      • allpropertyspikes.segments[0].spiketrains[2] for “flying”
      • allpropertyspikes.segments[0].spiketrains[3] for “yellow”
    • Similarly, for the relation units “eats”, “likes”, “travels”, “has”, and “colored” are respectively

      • allrelationspikes.segments[0].spiketrains[0] for “eats”
      • allrelationspikes.segments[0].spiketrains[1] for “likes”
      • allrelationspikes.segments[0].spiketrains[2] for “travels”
      • allrelationspikes.segments[0].spiketrains[3] for “has”
      • allrelationspikes.segments[0].spiketrains[4] for “colored”
makeGenerator(genTime)

Set up spike generator to start each unit. genTime is a float representing the start time.

printPklSpikes(inFileName, outFileName)

Legacy.

printSpikes(fileName)

.

setRecord()

Records spikes of all the neurons in the propertyCells and relationCells populations created via createNeurons().