# brainpy.initialize.DOGDecay#

class brainpy.initialize.DOGDecay(sigmas, max_ws, min_w=None, encoding_values=None, periodic_boundary=False, normalize=True, include_self=True)[source]#

Builds a Difference-Of-Gaussian (dog) connectivity pattern within a population of neurons.

Mathematically, for the given pair of neurons $$(i, j)$$, the weight between them is computed as

$w(i, j) = w_{max}^+ \cdot \exp(-\frac{\sum_{k=1}^n |v_k^i - v_k^j|^2}{2\sigma_+^2}) - w_{max}^- \cdot \exp(-\frac{\sum_{k=1}^n |v_k^i - v_k^j|^2}{2\sigma_-^2})$

where weights smaller than $$0.005 * max(w_{max}, w_{min})$$ are not created and self-connections are avoided by default (parameter allow_self_connections).

Parameters
• sigmas (tuple) – Widths of the positive and negative Gaussian functions.

• max_ws (tuple) – The weight amplitudes of the positive and negative Gaussian functions.

• min_w (float, None) – The minimum weight value below which synapses are not created (default: $$0.005 * min(max\_ws)$$).

• include_self (bool) – Whether create the connections at the same position (self-connections).

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

• 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.

__init__(sigmas, max_ws, min_w=None, encoding_values=None, periodic_boundary=False, normalize=True, include_self=True)[source]#

Methods

 __init__(sigmas, max_ws[, min_w, ...])