Skip to content

Commit 0290888

Browse files
committed
Update connectivity_concepts documentation to new tripartite scheme
1 parent 8229ddb commit 0290888

File tree

1 file changed

+27
-34
lines changed

1 file changed

+27
-34
lines changed

doc/htmldoc/synapses/connectivity_concepts.rst

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -500,18 +500,25 @@ As multapses are per default allowed and possible with this rule, you can disall
500500

501501
.. _tripartite_connectivity:
502502

503-
Tripartite Bernoulli with pool
504-
------------------------------
503+
Third-factor Bernoulli with pool
504+
--------------------------------
505505

506506
For each possible pair of nodes from a source ``NodeCollection`` (e.g., a neuron population ``S``)
507507
and a target ``NodeCollection`` (e.g., a neuron population ``T``), a connection is
508-
created with probability ``p_primary``, and these connections are
509-
called 'primary' connections. For each primary connection, a
508+
created according to the ``conn_spec`` parameter passed to
509+
``TripariteConnect``; any one-directional connection specification can
510+
be used. The connections created between ``S`` and ``T`` are the
511+
'primary' connections.
512+
513+
For each primary connection, a
510514
third-party connection pair involving a node from a third ``NodeCollection``
511-
(e.g., an astrocyte population ``A``) is created with the conditional probability
512-
``p_third_if_primary``. This connection pair includes a connection
515+
(e.g., an astrocyte population ``A``) is created according to the
516+
``third_factor_conn_spec`` provide. This connection pair includes a connection
513517
from the ``S`` node to the ``A`` node, and a connection from the ``A`` node to the
514-
``T`` node. The ``A`` node to connect to is chosen
518+
``T`` node.
519+
520+
At present, ``third_factor_bernoulli_with_pool`` is the only connection rule
521+
available for third-factor connectivity. It chooses the ``A`` node to connect
515522
at random from a pool, a subset of the nodes in ``A``. By default,
516523
this pool is all of ``A``.
517524

@@ -548,55 +555,41 @@ up to two randomly selected nodes in ``A`` (given ``pool_size == 2``).
548555
S = nest.Create('aeif_cond_alpha_astro', N_S)
549556
T = nest.Create('aeif_cond_alpha_astro', N_T)
550557
A = nest.Create('astrocyte_lr_1994', N_A)
551-
conn_spec = {'rule': 'tripartite_bernoulli_with_pool',
552-
'p_primary': p_primary,
553-
'p_third_if_primary': p_third_if_primary,
554-
'pool_type': pool_type,
555-
'pool_size': pool_size}
558+
conn_spec = {'rule': 'pairwise_bernoulli',
559+
'p': p_primary}
560+
third_factor_conn_spec = {'rule': 'third_factor_bernoulli_with_pool',
561+
'p': p_third_if_primary,
562+
'pool_type': pool_type,
563+
'pool_size': pool_size}
556564
syn_specs = {'third_out': 'sic_connection'}
557-
nest.TripartiteConnect(S, T, A, conn_spec, syn_specs)
565+
nest.TripartiteConnect(S, T, A, conn_spec, third_factor_conn_spec, syn_specs)
558566
559567
(B) In
560568
the first example of ``'block'`` pool type, let ``N_T/N_A`` = 2,
561569
then each node in ``T`` can be connected with one node in ``A``
562570
(``pool_size == 1`` is required because ``N_A < N_T``), and each node in
563571
``A`` can be connected with up to two nodes in ``T``.
564572

573+
The code for this example is identical to the code for example (A),
574+
except for the choice of pool type and size:
575+
565576
.. code-block:: python
566577
567-
N_S, N_T, N_A, p_primary, p_third_if_primary = 6, 6, 3, 0.2, 1.0
568578
pool_type, pool_size = 'block', 1
569-
S = nest.Create('aeif_cond_alpha_astro', N_S)
570-
T = nest.Create('aeif_cond_alpha_astro', N_T)
571-
A = nest.Create('astrocyte_lr_1994', N_A)
572-
conn_spec = {'rule': 'tripartite_bernoulli_with_pool',
573-
'p_primary': p_primary,
574-
'p_third_if_primary': p_third_if_primary,
575-
'pool_type': pool_type,
576-
'pool_size': pool_size}
577-
syn_specs = {'third_out': 'sic_connection'}
578-
nest.TripartiteConnect(S, T, A, conn_spec, syn_specs)
579579
580580
(C) In the second example
581581
of ``'block'`` pool type, let ``N_A/N_T`` = 2, then each node in
582582
``T`` can be connected with up to two nodes in ``A`` (``pool_size == 2`` is
583583
required because ``N_A/N_T`` = 2), and each node in ``A`` can be
584584
connected to one node in ``T``.
585585

586+
In this example, we have different values for ``N_T`` and ``N_A`` than
587+
in examples (A) and (B), and a different pool size than in example (B):
588+
586589
.. code-block:: python
587590
588591
N_S, N_T, N_A, p_primary, p_third_if_primary = 6, 3, 6, 0.2, 1.0
589592
pool_type, pool_size = 'block', 2
590-
S = nest.Create('aeif_cond_alpha_astro', N_S)
591-
T = nest.Create('aeif_cond_alpha_astro', N_T)
592-
A = nest.Create('astrocyte_lr_1994', N_A)
593-
conn_spec = {'rule': 'tripartite_bernoulli_with_pool',
594-
'p_primary': p_primary,
595-
'p_third_if_primary': p_third_if_primary,
596-
'pool_type': pool_type,
597-
'pool_size': pool_size}
598-
syn_specs = {'third_out': 'sic_connection'}
599-
nest.TripartiteConnect(S, T, A, conn_spec, syn_specs)
600593
601594
602595
References

0 commit comments

Comments
 (0)