# brainpy.connect.GaussianProb#

class brainpy.connect.GaussianProb(sigma, encoding_values=None, normalize=True, include_self=True, periodic_boundary=False, seed=None, **kwargs)[source]#

Builds a Gaussian connectivity pattern within a population of neurons, where the connection probability decay according to the gaussian function.

Specifically, for any pair of neurons $$(i, j)$$,

$p(i, j)=\exp(-\frac{\sum_{k=1}^n |v_k^i - v_k^j|^2 }{2\sigma^2})$

where $$v_k^i$$ is the $$i$$-th neuron’s encoded value at dimension $$k$$.

Parameters:
• sigma (float) – Width of the Gaussian function.

• encoding_values (optional, list, tuple, int, float) –

The value ranges to encode for neurons at each axis.

• If values is not provided, the neuron only encodes each positional information, i.e., $$(i, j, k, ...)$$, where $$i, j, k$$ is the index in the high-dimensional space.

• If values is a single tuple/list of int/float, neurons at each dimension will encode the same range of values. For example, values=(0, np.pi), neurons at each dimension will encode a continuous value space [0, np.pi].

• If values is a tuple/list of list/tuple, it means the value space will be different for each dimension. For example, values=((-np.pi, np.pi), (10, 20), (0, 2 * np.pi)).

• periodic_boundary (bool) – Whether the neuron encode the value space with the periodic boundary.

• normalize (bool) – Whether normalize the connection probability .

• include_self (bool) – Whether create the connection at the same position.

• seed (int) – The random seed.

__init__(sigma, encoding_values=None, normalize=True, include_self=True, periodic_boundary=False, seed=None, **kwargs)[source]#

Methods

 __init__(sigma[, encoding_values, ...]) build_conn() build connections with certain data type. build_coo() Build a coo sparse connection data. build_csr() Build a csr sparse connection data. build_mat([pre_size, post_size]) Build a binary matrix connection data. require(*structures) Require all the connection data needed. requires(*structures) Require all the connection data needed.

Attributes

 is_version2_style