networkBuilder
class networkBuilder
Generates reservoir connectivity, weights, and metadata for the LSM.
Functions
| Name | Description |
|---|---|
| networkBuilder | Constructs a network with randomized excitatory/inhibitory distribution and geometry. |
| build | Builds connectivity, weights, and delays based on geometry. |
| normalize_weights | Normalizes weights by the number of incoming connections per target neuron. |
| compute_EI_indices | Populates lists of excitatory and inhibitory neuron indices. |
Function Details
build
void build( const Eigen::Vector3i& resSize, const Eigen::Matrix2f& w, float r0, const Eigen::Matrix2f& k0, float f_inhibit, float tau, bool /*show*/, const std::vector<int>& UC, const Eigen::Vector3i& UC_dims, bool _normalize )
Builds connectivity, weights, and delays based on geometry.
-
resSize - Reservoir dimensions.
-
w - Weight matrix for E/I combinations.
-
r0 - Spatial decay radius.
-
k0 - Connection probability coefficients.
-
f_inhibit - Fraction of inhibitory neurons.
-
tau - Synaptic delay scaling.
-
show - Unused flag kept for compatibility.
-
UC - Optional user-defined pattern.
-
UC_dims - Dimensions of the user pattern.
-
_normalize - Whether to normalize outgoing weights per neuron.
compute_EI_indices
void compute_EI_indices()
Populates lists of excitatory and inhibitory neuron indices.
networkBuilder
networkBuilder( const Eigen::Vector3i& resSize = Eigen::Vector3i(3, 3, 5), const Eigen::Matrix2f& w = (Eigen::Matrix2f() << 3, 6, -2, -2).finished(), float r0 = 2.0f, const Eigen::Matrix2f& k0 = (Eigen::Matrix2f() << 0.45f, 0.3f, 0.6f, 0.15f).finished(), float f_inhibit = 0.2f, float tau = 1e-3f, bool show = false, // ignored const std::vector<int>& UC = {}, const Eigen::Vector3i& UC_dims = Eigen::Vector3i(0, 0, 0), bool _normalize = true )
Constructs a network with randomized excitatory/inhibitory distribution and geometry.
-
resSize - Reservoir dimensions.
-
w - Weight matrix for E/I combinations.
-
r0 - Spatial decay radius.
-
k0 - Connection probability coefficients.
-
f_inhibit - Fraction of inhibitory neurons.
-
tau - Synaptic delay scaling.
-
show - Deprecated flag (ignored).
-
UC - Optional user-defined pattern.
-
UC_dims - Dimensions of the user pattern.
-
_normalize - Whether to normalize outgoing weights per neuron.
normalize_weights
std::vector<float> normalize_weights( const std::vector<int>& X, const std::vector<int>& Xn, const std::vector<float>& W)
Normalizes weights by the number of incoming connections per target neuron.
-
X - Source indices for each connection.
-
Xn - Destination indices for each connection.
-
W - Unnormalized weights.
- Return
- Weight vector scaled per destination neuron.