third_factor_bernoulli_with_pool#
- class brainpy.state.network.third_factor_bernoulli_with_pool(*, p, pool_size, pool_type)[source]#
Return a
third_factor_bernoulli_with_poolspec (NEST tripartite astro-pool rule).Used as the
third_factor_conn_specoftripartite_connect(): for each realized primarypre->postedge, an independent Bernoulli(p) trial decides whether it is paired with one astrocyte drawn from the target neuron’s pool ofpool_sizeastrocytes.- Parameters:
- Returns:
The spec object.
- Return type:
_ThirdFactorBernoulliWithPool- Raises:
ValueError – If
pis outside[0, 1],pool_size < 1, orpool_typeis unknown.
See also
brainpy.state.Simulator.tripartite_connectExamples
>>> from brainpy import state as bp >>> rule = bp.third_factor_bernoulli_with_pool( ... p=0.5, pool_size=10, pool_type='random') >>> rule.p, rule.pool_size, rule.pool_type (0.5, 10, 'random')
The returned spec is passed as the
third_factor_conn_specoftripartite_connect().