connectome_manipulator.model_building.conn_prob¶
Module for building stochastic connection probability models of various model orders
- connectome_manipulator.model_building.conn_prob.build(order, **kwargs)[source]¶
Builds a stochastic connection probability model from (binned) data.
- Parameters:
order (str) – Model order, such as “1” (constant), “2” (distance-dependent), “3” (bipolar distance-dependent), “4” (offset-dependent), “4R” (reduced offset-dependent), “5” (position-dependent), “5R” (reduced position dependent)
**kwargs – Additional keyword arguments depending on the model order; see Notes
- Returns:
Fitted stochastic connection probability model
- Return type:
Type depends on the model order; see Notes
Note
For (optional) keyword arguments and return types, see details in the respective helper functions:
Order 1:
build_1st_order()Order 2:
build_2nd_order()Order 3:
build_3rd_order()Order 4:
build_4th_order()Order 4R:
build_4th_order_reduced()Order 5:
build_5th_order()Order 5R:
build_5th_order_reduced()
- connectome_manipulator.model_building.conn_prob.build_1st_order(p_conn, **_)[source]¶
Builds a stochastic 1st order connection probability model (Erdos-Renyi).
- Parameters:
p_conn (float) – Constant connection probability, as returned by
extract_1st_order()- Returns:
Resulting stochastic 1st order connectivity model
- Return type:
connectome_manipulator.model_building.model_types.ConnProb1stOrderModel
- connectome_manipulator.model_building.conn_prob.build_2nd_order(p_conn_dist, dist_bins, count_all, model_specs=None, rel_fit_err_th=None, strict_fit=False, **_)[source]¶
Builds a stochastic 2nd order connection probability model (exponential distance-dependent).
- Parameters:
p_conn_dist (numpy.ndarray) – Binned connection probabilities, as retuned by
extract_2nd_order()dist_bins (numpy.ndarray) – Distance bin edges, as returned by
extract_2nd_order()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_2nd_order()model_specs (dict) – Model specifications; see Notes
rel_fit_err_th (float) – Threshold for rel. standard error of the coefficients; exceeding the threshold will return an invalid model
strict_fit (bool) – Flag to enforce strict model fitting, which means that first data bin must contain valid data (otherwise, there is a risk of a bad extrapolation at low distances)
- Returns:
Resulting stochastic 2nd order connectivity model
- Return type:
connectome_manipulator.model_building.model_types.ConnProb2ndOrder[Complex]ExpModel
Note
Info on possible keys contained in model_specs dict:
type (str): Type of the fitted model; either “SimpleExponential” (2 parameters) or “ComplexExponential” (5 parameters)
p0 (list-like): Initial guess for parameter fit, as used in
scipy.optimize.curve_fit()bounds (list-like): Lower and upper bounds on parameters, as used in
scipy.optimize.curve_fit()
- connectome_manipulator.model_building.conn_prob.build_3rd_order(p_conn_dist_bip, dist_bins, count_all, bip_coord_data, model_specs=None, rel_fit_err_th=None, strict_fit=False, **_)[source]¶
Builds a stochastic 3rd order connection probability model (bipolar exponential distance-dependent).
- Parameters:
p_conn_dist_bip (numpy.ndarray) – Binned bipolar connection probabilities, as retuned by
extract_3rd_order()dist_bins (numpy.ndarray) – Distance bin edges, as returned by
extract_3rd_order()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_3rd_order()bip_coord_data (int) – Index of bipolar coordinate axis, as returned by
extract_3rd_order()model_specs (dict) – Model specifications; see Notes
rel_fit_err_th (float) – Threshold for rel. standard error of the coefficients; exceeding the threshold will return an invalid model
strict_fit (bool) – Flag to enforce strict model fitting, which means that first data bin must contain valid data (otherwise, there is a risk of a bad extrapolation at low distances)
- Returns:
Resulting stochastic 3rd order connectivity model
- Return type:
connectome_manipulator.model_building.model_types.ConnProb3rdOrder[Complex]ExpModel
Note
Info on possible keys contained in model_specs dict:
type (str): Type of the fitted model; either “SimpleExponential” (2 parameters) or “ComplexExponential” (5 parameters)
p0 (list-like): Initial guess for parameter fit, as used in
scipy.optimize.curve_fit()bounds (list-like): Lower and upper bounds on parameters, as used in
scipy.optimize.curve_fit()
- connectome_manipulator.model_building.conn_prob.build_4th_order(p_conn_offset, dx_bins, dy_bins, dz_bins, count_all, model_specs=None, smoothing_sigma_um=None, **_)[source]¶
Builds a stochastic 4th order connection probability model (offset-dependent, based on linear interpolation).
- Parameters:
p_conn_offset (numpy.ndarray) – Binned offset-dependent connection probabilities, as retuned by
extract_4th_order()dx_bins (numpy.ndarray) – Offset bin edges along x-axis, as returned by
extract_4th_order()dy_bins (numpy.ndarray) – Offset bin edges along y-axis, as returned by
extract_4th_order()dz_bins (numpy.ndarray) – Offset bin edges along z-axis, as returned by
extract_4th_order()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_4th_order()model_specs (dict) – Model specifications; see Notes
smoothing_sigma_um (float/list-like) – Sigma in um for Gaussian smoothing; can be scalar (same value for x/y/z dimension) or list-like with three individual values for x/y/z dimensions
- Returns:
Resulting stochastic 4th order connectivity model
- Return type:
connectome_manipulator.model_building.model_types.ConnProb4thOrderLinInterpnModel
Note
Info on possible keys contained in model_specs dict:
type (str): Type of the fitted model; only “LinearInterpolation” supported which does not require any additional specs
- connectome_manipulator.model_building.conn_prob.build_4th_order_reduced(p_conn_offset, dr_bins, dz_bins, count_all, axial_coord_data, model_specs=None, smoothing_sigma_um=None, **_)[source]¶
Builds a stochastic 4th order reduced connection probability model (offset-dependent, based on linear interpolation).
- Parameters:
p_conn_offset (numpy.ndarray) – Binned offset-dependent connection probabilities, as retuned by
extract_4th_order_reduced()dr_bins (numpy.ndarray) – Offset bin edges along radial axis, as returned by
extract_4th_order_reduced()dz_bins (numpy.ndarray) – Offset bin edges along axial axis, as returned by
extract_4th_order_reduced()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_4th_order_reduced()axial_coord_data (int) – Index of axial coordinate axis, as returned by
extract_4th_order_reduced()model_specs (dict) – Model specifications; see Notes
smoothing_sigma_um (float/list-like) – Sigma in um for Gaussian smoothing; can be scalar (same value for radial/axial dimension) or list-like with two individual values for radial/axial dimensions
- Returns:
Resulting stochastic 4th order reduced connectivity model
- Return type:
connectome_manipulator.model_building.model_types.ConnProb4thOrderLinInterpnReducedModel
Note
Info on possible keys contained in model_specs dict:
type (str): Type of the fitted model; only “LinearInterpolation” supported which does not require any additional specs
- connectome_manipulator.model_building.conn_prob.build_5th_order(p_conn_position, x_bins, y_bins, z_bins, dx_bins, dy_bins, dz_bins, count_all, model_specs=None, smoothing_sigma_um=None, **_)[source]¶
Builds a stochastic 5th order connection probability model (position-dependent, based on linear interpolation).
- Parameters:
p_conn_position (numpy.ndarray) – Binned position- and offset-dependent connection probabilities, as retuned by
extract_5th_order()x_bins (numpy.ndarray) – Position bin edges along x-axis, as returned by
extract_5th_order()y_bins (numpy.ndarray) – Position bin edges along y-axis, as returned by
extract_5th_order()z_bins (numpy.ndarray) – Position bin edges along z-axis, as returned by
extract_5th_order()dx_bins (numpy.ndarray) – Offset bin edges along x-axis, as returned by
extract_5th_order()dy_bins (numpy.ndarray) – Offset bin edges along y-axis, as returned by
extract_5th_order()dz_bins (numpy.ndarray) – Offset bin edges along z-axis, as returned by
extract_5th_order()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_5th_order()model_specs (dict) – Model specifications; see Notes
smoothing_sigma_um (float/list-like) – Sigma in um for Gaussian smoothing; can be scalar (same value for x/y/z/dx/dy/dz dimension) or list-like with six individual values for x/y/z/dx/dy/dz dimensions
- Returns:
Resulting stochastic 5th order connectivity model
- Return type:
connectome_manipulator.model_building.model_types.ConnProb5thOrderLinInterpnModel
Note
Info on possible keys contained in model_specs dict:
type (str): Type of the fitted model; only “LinearInterpolation” supported which does not require any additional specs
- connectome_manipulator.model_building.conn_prob.build_5th_order_reduced(p_conn_position, z_bins, dr_bins, dz_bins, count_all, axial_coord_data, model_specs=None, smoothing_sigma_um=None, **_)[source]¶
Builds a stochastic 5th order reduced connection probability model (position-dependent, based on linear interpolation).
- Parameters:
p_conn_position (numpy.ndarray) – Binned position- and offset-dependent connection probabilities, as retuned by
extract_5th_order_reduced()z_bins (numpy.ndarray) – Position bin edges along axial axis, as returned by
extract_5th_order_reduced()dr_bins (numpy.ndarray) – Offset bin edges along radial axis, as returned by
extract_5th_order_reduced()dz_bins (numpy.ndarray) – Offset bin edges along axial axis, as returned by
extract_5th_order_reduced()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_5th_order_reduced()axial_coord_data (int) – Index of axial coordinate axis, as returned by
extract_5th_order_reduced()model_specs (dict) – Model specifications; see Notes
smoothing_sigma_um (float/list-like) – Sigma in um for Gaussian smoothing; can be scalar (same value for z/dr/dz dimension) or list-like with three individual values for z/dr/dz dimensions
- Returns:
Resulting stochastic 5th order reduced connectivity model
- Return type:
connectome_manipulator.model_building.model_types.ConnProb5thOrderLinInterpnReducedModel
Note
Info on possible keys contained in model_specs dict:
type (str): Type of the fitted model; only “LinearInterpolation” supported which does not require any additional specs
- connectome_manipulator.model_building.conn_prob.extract(circuit, order, sel_src=None, sel_dest=None, sample_size=None, edges_popul_name=None, CV_dict=None, **kwargs)[source]¶
Extracts the connection probabilities between samples of neurons.
- Parameters:
circuit (bluepysnap.Circuit) – Input circuit
order (str) – Model order, such as “1” (constant), “2” (distance-dependent), “3” (bipolar distance-dependent), “4” (offset-dependent), “4R” (reduced offset-dependent), “5” (position-dependent), “5R” (reduced position dependent)
sel_src (str/list-like/dict) – Source (pre-synaptic) neuron selection
sel_dest (str/list-like/dict) – Target (post-synaptic) neuron selection
sample_size (int) – Size of random subsample of data to extract data from
edges_popul_name (str) – Name of SONATA egdes population to extract data from
CV_dict (dict) – Optional cross-validation dictionary, containing “n_folds” (int), “fold_idx” (int), “training_set” (bool) keys; will be automatically provided by the framework if “CV_folds” are specified
**kwargs – Additional keyword arguments depending on the model order; see Notes
- Returns:
Dictionary containing the extracted connection probability data depending on the model order
- Return type:
dict
Note
For (optional) keyword arguments, see details in the respective helper functions:
Order 1:
extract_1st_order()Order 2:
extract_2nd_order()Order 3:
extract_3rd_order()Order 4:
extract_4th_order()Order 4R:
extract_4th_order_reduced()Order 5:
extract_5th_order()Order 5R:
extract_5th_order_reduced()
- connectome_manipulator.model_building.conn_prob.extract_1st_order(_nodes, edges, src_node_ids, tgt_node_ids, min_count_per_bin=10, **_)[source]¶
Extracts the average connection probability (1st order) from a sample of pairs of neurons.
- Parameters:
_nodes (list) – Two-element list containing source and target neuron populations of type bluepysnap.nodes.Nodes - Not used
edges (bluepysnap.edges.Edges) – SONATA egdes population to extract connection probabilities from
src_node_ids (list-like) – List of source (pre-synaptic) neuron IDs
tgt_node_ids (list-like) – List of target (post-synaptic) neuron IDs
min_count_per_bin (int) – Minimum number of samples; otherwise, no estimate will be made
- Returns:
Dictionary containing the extracted 1st-order connection probability data
- Return type:
dict
- connectome_manipulator.model_building.conn_prob.extract_2nd_order(nodes, edges, src_node_ids, tgt_node_ids, bin_size_um=100, max_range_um=None, pos_map_file=None, min_count_per_bin=10, **_)[source]¶
Extracts the binned, distance-dependent connection probabilities (2nd order) from a sample of pairs of neurons.
- Parameters:
nodes (list) – Two-element list containing source and target neuron populations of type bluepysnap.nodes.Nodes
edges (bluepysnap.edges.Edges) – SONATA egdes population to extract connection probabilities from
src_node_ids (list-like) – List of source (pre-synaptic) neuron IDs
tgt_node_ids (list-like) – List of target (post-synaptic) neuron IDs
bin_size_um (float) – Distance bin size in um
max_range_um (float) – Maximum distance range in um
pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
min_count_per_bin (int) – Minimum number of samples per bin; otherwise, no estimate will be made for a given bin
- Returns:
Dictionary containing the extracted 2nd-order connection probability data
- Return type:
dict
- connectome_manipulator.model_building.conn_prob.extract_3rd_order(nodes, edges, src_node_ids, tgt_node_ids, bin_size_um=100, max_range_um=None, pos_map_file=None, no_dist_mapping=False, min_count_per_bin=10, bip_coord=2, **_)[source]¶
Extracts the binned, bipolar distance-dependent connection probability (3rd order) from a sample of pairs of neurons.
- Parameters:
nodes (list) – Two-element list containing source and target neuron populations of type bluepysnap.nodes.Nodes
edges (bluepysnap.edges.Edges) – SONATA egdes population to extract connection probabilities from
src_node_ids (list-like) – List of source (pre-synaptic) neuron IDs
tgt_node_ids (list-like) – List of target (post-synaptic) neuron IDs
bin_size_um (float) – Distance bin size in um
max_range_um (float) – Maximum distance range in um
pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
no_dist_mapping (bool) – Flag to disable position mapping for computing distances, i.e., position mapping will only be used to determine the bipolar coordinate if selected
min_count_per_bin (int) – Minimum number of samples per bin; otherwise, no estimate will be made for a given bin
bip_coord (int) – Index to select bipolar coordinate axis (0..x, 1..y, 2..z), usually perpendicular to layers
- Returns:
Dictionary containing the extracted 3rd-order connection probability data
- Return type:
dict
- connectome_manipulator.model_building.conn_prob.extract_4th_order(nodes, edges, src_node_ids, tgt_node_ids, bin_size_um=100, max_range_um=None, pos_map_file=None, min_count_per_bin=10, **_)[source]¶
Extracts the binned, offset-dependent connection probability (4th order) from a sample of pairs of neurons.
- Parameters:
nodes (list) – Two-element list containing source and target neuron populations of type bluepysnap.nodes.Nodes
edges (bluepysnap.edges.Edges) – SONATA egdes population to extract connection probabilities from
src_node_ids (list-like) – List of source (pre-synaptic) neuron IDs
tgt_node_ids (list-like) – List of target (post-synaptic) neuron IDs
bin_size_um (float/list-like) – Offset bin size in um; can be scalar (same value for x/y/z dimension) or list-like with three individual values for x/y/z dimensions
max_range_um (float/list-like) – Maximum offset range in um; can be scalar (same +/- value for all dimensions) or list-like with three elements for x/y/z dimensions each of which can be either a scalar (same +/- ranges) or a two-element list with individual +/- ranges
pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
min_count_per_bin (int) – Minimum number of samples per bin; otherwise, no estimate will be made for a given bin
- Returns:
Dictionary containing the extracted 4th-order connection probability data
- Return type:
dict
- connectome_manipulator.model_building.conn_prob.extract_4th_order_reduced(nodes, edges, src_node_ids, tgt_node_ids, bin_size_um=100, max_range_um=None, pos_map_file=None, min_count_per_bin=10, axial_coord=2, **_)[source]¶
Extracts the binned, offset-dependent connection probability (reduced 4th order) from a sample of pairs of neurons.
- Parameters:
nodes (list) – Two-element list containing source and target neuron populations of type bluepysnap.nodes.Nodes
edges (bluepysnap.edges.Edges) – SONATA egdes population to extract connection probabilities from
src_node_ids (list-like) – List of source (pre-synaptic) neuron IDs
tgt_node_ids (list-like) – List of target (post-synaptic) neuron IDs
bin_size_um (float/list-like) – Offset bin size in um; can be scalar (same value for radial/axial dimension) or list-like with two individual values for radial/axial dimensions
max_range_um (float/list-like) – Maximum offset range in um; can be scalar (same +/- value for all dimensions) or list-like with two elements for radial/axial dimensions each of which can be either a scalar (same +/- ranges) or a two-element list with individual +/- ranges; in any case, the lower radial offset range must always be zero
pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
min_count_per_bin (int) – Minimum number of samples per bin; otherwise, no estimate will be made for a given bin
axial_coord (int) – Index to select axial coordinate (0..x, 1..y, 2..z), usually perpendicular to layers
- Returns:
Dictionary containing the extracted 4th-order (reduced) connection probability data
- Return type:
dict
- connectome_manipulator.model_building.conn_prob.extract_5th_order(nodes, edges, src_node_ids, tgt_node_ids, position_bin_size_um=1000, position_max_range_um=None, offset_bin_size_um=100, offset_max_range_um=None, pos_map_file=None, min_count_per_bin=10, **_)[source]¶
Extracts the binned, position-dependent connection probability (5th order) from a sample of pairs of neurons.
- Parameters:
nodes (list) – Two-element list containing source and target neuron populations of type bluepysnap.nodes.Nodes
edges (bluepysnap.edges.Edges) – SONATA egdes population to extract connection probabilities from
src_node_ids (list-like) – List of source (pre-synaptic) neuron IDs
tgt_node_ids (list-like) – List of target (post-synaptic) neuron IDs
position_bin_size_um (float/list-like) – Position bin size in um; can be scalar (same value for x/y/z dimension) or list-like with three individual values for x/y/z dimensions
position_max_range_um (float/list-like) – Maximum position range in um; can be scalar (same +/- value for all dimensions) or list-like with three elements for x/y/z dimensions each of which can be either a scalar (same +/- ranges) or a two-element list with individual +/- ranges
offset_bin_size_um (float/list-like) – Offset bin size in um; can be scalar (same value for x/y/z dimension) or list-like with three individual values for x/y/z dimensions
offset_max_range_um (float/list-like) – Maximum offset range in um; can be scalar (same +/- value for all dimensions) or list-like with three elements for x/y/z dimensions each of which can be either a scalar (same +/- ranges) or a two-element list with individual +/- ranges
pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
min_count_per_bin (int) – Minimum number of samples per bin; otherwise, no estimate will be made for a given bin
- Returns:
Dictionary containing the extracted 5th-order connection probability data
- Return type:
dict
- connectome_manipulator.model_building.conn_prob.extract_5th_order_reduced(nodes, edges, src_node_ids, tgt_node_ids, position_bin_size_um=1000, position_max_range_um=None, offset_bin_size_um=100, offset_max_range_um=None, pos_map_file=None, min_count_per_bin=10, axial_coord=2, **_)[source]¶
Extracts the binned, position-dependent connection probability (5th order reduced) from a sample of pairs of neurons.
- Parameters:
nodes (list) – Two-element list containing source and target neuron populations of type bluepysnap.nodes.Nodes
edges (bluepysnap.edges.Edges) – SONATA egdes population to extract connection probabilities from
src_node_ids (list-like) – List of source (pre-synaptic) neuron IDs
tgt_node_ids (list-like) – List of target (post-synaptic) neuron IDs
position_bin_size_um (float) – Axial position bin size in um
position_max_range_um (float/list-like) – Maximum axial position range in um; can be scalar (same +/- value) or list-like with two elements for individual +/- ranges
offset_bin_size_um (float/list-like) – Offset bin size in um; can be scalar (same value for radial/axial dimension) or list-like with two individual values for radial/axial dimensions
offset_max_range_um (float/list-like) – Maximum offset range in um; can be scalar (same +/- value for all dimensions) or list-like with two elements for radial/axial dimensions each of which can be either a scalar (same +/- ranges) or a two-element list with individual +/- ranges; in any case, the lower radial offset range must always be zero
pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
min_count_per_bin (int) – Minimum number of samples per bin; otherwise, no estimate will be made for a given bin
axial_coord (int) – Index to select axial coordinate (0..x, 1..y, 2..z), usually perpendicular to layers
- Returns:
Dictionary containing the extracted 5th-order (reduced) connection probability data
- Return type:
dict
- connectome_manipulator.model_building.conn_prob.plot(order, **kwargs)[source]¶
Visualizes extracted data vs. actual model output.
- Parameters:
order (str) – Model order, such as “1” (constant), “2” (distance-dependent), “3” (bipolar distance-dependent), “4” (offset-dependent), “4R” (reduced offset-dependent), “5” (position-dependent), “5R” (reduced position dependent)
**kwargs – Additional keyword arguments depending on the model order; see Notes
Note
For (optional) keyword arguments, see details in the respective helper functions:
Order 1:
plot_1st_order()Order 2:
plot_2nd_order()Order 3:
plot_3rd_order()Order 4:
plot_4th_order()Order 4R:
plot_4th_order_reduced()Order 5:
plot_5th_order()Order 5R:
plot_5th_order_reduced()
- connectome_manipulator.model_building.conn_prob.plot_1st_order(out_dir, p_conn, src_cell_count, tgt_cell_count, model, **_)[source]¶
Visualizes 1st order extracted data vs. actual model output.
- Parameters:
out_dir (str) – Path to output directory where the results figures will be stored
p_conn (float) – Constant connection probability, as returned by
extract_1st_order()src_cell_count (int) – Number of source (pre-synaptic) neurons, as returned by
extract_1st_order()tgt_cell_count (int) – Number or target (post-synaptic) neurons, as returned by
extract_1st_order()model (connectome_manipulator.model_building.model_types.ConnProb1stOrderModel) – Fitted stochastic 1st order connectivity model, as returned by
build_1st_order()
- connectome_manipulator.model_building.conn_prob.plot_2nd_order(out_dir, p_conn_dist, count_conn, count_all, dist_bins, src_cell_count, tgt_cell_count, model, pos_map_file=None, **_)[source]¶
Visualizes 2nd order extracted data vs. actual model output.
- Parameters:
out_dir (str) – Path to output directory where the results figures will be stored
p_conn_dist (numpy.ndarray) – Binned connection probabilities, as retuned by
extract_2nd_order()count_conn (numpy.ndarray) – Count of all connected pairs of neurons (i.e., all actual connections) in each bin, as retuned by
extract_2nd_order()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_2nd_order()dist_bins (numpy.ndarray) – Distance bin edges, as returned by
extract_2nd_order()src_cell_count (int) – Number of source (pre-synaptic) neurons, as returned by
extract_2nd_order()tgt_cell_count (int) – Number or target (post-synaptic) neurons, as returned by
extract_2nd_order()model (connectome_manipulator.model_building.model_types.ConnProb2ndOrder[Complex]ExpModel) – Fitted stochastic 2nd order connectivity model, as returned by
extract_2nd_order()pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
- connectome_manipulator.model_building.conn_prob.plot_3rd_order(out_dir, p_conn_dist_bip, count_conn, count_all, dist_bins, src_cell_count, tgt_cell_count, model, bip_coord_data, pos_map_file=None, **_)[source]¶
Visualizes 3rd order extracted data vs. actual model output.
- Parameters:
out_dir (str) – Path to output directory where the results figures will be stored
p_conn_dist_bip (numpy.ndarray) – Binned bipolar connection probabilities, as retuned by
extract_3rd_order()count_conn (numpy.ndarray) – Count of all connected pairs of neurons (i.e., all actual connections) in each bin, as retuned by
extract_3rd_order()count_all (numpy.ndarray) – Count of all pairs of neurons (i.e., all possible connections) in each bin, as retuned by
extract_3rd_order()dist_bins (numpy.ndarray) – Distance bin edges, as returned by
extract_3rd_order()src_cell_count (int) – Number of source (pre-synaptic) neurons, as returned by
extract_3rd_order()tgt_cell_count (int) – Number or target (post-synaptic) neurons, as returned by
extract_3rd_order()model (connectome_manipulator.model_building.model_types.ConnProb3rdOrder[Complex]ExpModel) – Fitted stochastic 3rd order connectivity model, as returned by
extract_3rd_order()bip_coord_data (int) – Index of bipolar coordinate axis, as returned by
extract_3rd_order()pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
- connectome_manipulator.model_building.conn_prob.plot_4th_order(out_dir, p_conn_offset, dx_bins, dy_bins, dz_bins, src_cell_count, tgt_cell_count, model, pos_map_file=None, plot_model_ovsampl=3, plot_model_extsn=0, **_)[source]¶
Visualizes 4th order extracted data vs. actual model output.
- Parameters:
out_dir (str) – Path to output directory where the results figures will be stored
p_conn_offset (numpy.ndarray) – Binned offset-dependent connection probabilities, as retuned by
extract_4th_order()dx_bins (numpy.ndarray) – Offset bin edges along x-axis, as returned by
extract_4th_order()dy_bins (numpy.ndarray) – Offset bin edges along y-axis, as returned by
extract_4th_order()dz_bins (numpy.ndarray) – Offset bin edges along z-axis, as returned by
extract_4th_order()src_cell_count (int) – Number of source (pre-synaptic) neurons, as returned by
extract_4th_order()tgt_cell_count (int) – Number or target (post-synaptic) neurons, as returned by
extract_4th_order()model (connectome_manipulator.model_building.model_types.ConnProb4thOrderLinInterpnModel) – Fitted stochastic 4th order connectivity model, as returned by
extract_4th_order()pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
plot_model_ovsampl (int) – Oversampling factor w.r.t. data binning for plotting model output (must be >=1)
plot_model_extsn (int) – Range extension in multiples of original data bins in each direction for plotting model output (must be >=0)
- connectome_manipulator.model_building.conn_prob.plot_4th_order_reduced(out_dir, p_conn_offset, dr_bins, dz_bins, src_cell_count, tgt_cell_count, model, axial_coord_data, pos_map_file=None, plot_model_ovsampl=3, plot_model_extsn=0, **_)[source]¶
Visualizes 4th order reduced extracted data vs. actual model output.
- Parameters:
out_dir (str) – Path to output directory where the results figures will be stored
p_conn_offset (numpy.ndarray) – Binned offset-dependent connection probabilities, as retuned by
extract_4th_order_reduced()dr_bins (numpy.ndarray) – Offset bin edges along radial axis, as returned by
extract_4th_order_reduced()dz_bins (numpy.ndarray) – Offset bin edges along axial axis, as returned by
extract_4th_order_reduced()src_cell_count (int) – Number of source (pre-synaptic) neurons, as returned by
extract_4th_order_reduced()tgt_cell_count (int) – Number or target (post-synaptic) neurons, as returned by
extract_4th_order_reduced()model (connectome_manipulator.model_building.model_types.ConnProb4thOrderLinInterpnReducedModel) – Fitted stochastic 4th order reduced connectivity model, as returned by
extract_4th_order_reduced()axial_coord_data (int) – Index of axial coordinate axis, as returned by
extract_4th_order_reduced()pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
plot_model_ovsampl (int) – Oversampling factor w.r.t. data binning for plotting model output (must be >=1)
plot_model_extsn (int) – Range extension in multiples of original data bins in each direction for plotting model output (must be >=0)
- connectome_manipulator.model_building.conn_prob.plot_5th_order(out_dir, p_conn_position, x_bins, y_bins, z_bins, dx_bins, dy_bins, dz_bins, src_cell_count, tgt_cell_count, model, pos_map_file=None, plot_model_ovsampl=3, plot_model_extsn=0, **_)[source]¶
Visualizes 5th order extracted data vs. actual model output.
- Parameters:
out_dir (str) – Path to output directory where the results figures will be stored
p_conn_position (numpy.ndarray) – Binned position- and offset-dependent connection probabilities, as retuned by
extract_5th_order()x_bins (numpy.ndarray) – Position bin edges along x-axis, as returned by
extract_5th_order()y_bins (numpy.ndarray) – Position bin edges along y-axis, as returned by
extract_5th_order()z_bins (numpy.ndarray) – Position bin edges along z-axis, as returned by
extract_5th_order()dx_bins (numpy.ndarray) – Offset bin edges along x-axis, as returned by
extract_5th_order()dy_bins (numpy.ndarray) – Offset bin edges along y-axis, as returned by
extract_5th_order()dz_bins (numpy.ndarray) – Offset bin edges along z-axis, as returned by
extract_5th_order()src_cell_count (int) – Number of source (pre-synaptic) neurons, as returned by
extract_5th_order()tgt_cell_count (int) – Number or target (post-synaptic) neurons, as returned by
extract_5th_order()model (connectome_manipulator.model_building.model_types.ConnProb5thOrderLinInterpnModel) – Fitted stochastic 5th order connectivity model, as returned by
extract_5th_order()pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
plot_model_ovsampl (int) – Oversampling factor w.r.t. data binning for plotting model output (must be >=1)
plot_model_extsn (int) – Range extension in multiples of original data bins in each direction for plotting model output (must be >=0)
- connectome_manipulator.model_building.conn_prob.plot_5th_order_reduced(out_dir, p_conn_position, z_bins, dr_bins, dz_bins, src_cell_count, tgt_cell_count, model, axial_coord_data, pos_map_file=None, plot_model_ovsampl=4, plot_model_extsn=0, **_)[source]¶
Visualizes 5th order reduced extracted data vs. actual model output.
- Parameters:
out_dir (str) – Path to output directory where the results figures will be stored
p_conn_position (numpy.ndarray) – Binned position- and offset-dependent connection probabilities, as retuned by
extract_5th_order_reduced()z_bins (numpy.ndarray) – Position bin edges along axial axis, as returned by
extract_5th_order_reduced()dr_bins (numpy.ndarray) – Offset bin edges along radial axis, as returned by
extract_5th_order_reduced()dz_bins (numpy.ndarray) – Offset bin edges along axial axis, as returned by
extract_5th_order_reduced()src_cell_count (int) – Number of source (pre-synaptic) neurons, as returned by
extract_5th_order_reduced()tgt_cell_count (int) – Number or target (post-synaptic) neurons, as returned by
extract_5th_order_reduced()model (connectome_manipulator.model_building.model_types.ConnProb5thOrderLinInterpnReducedModel) – Fitted stochastic 5th order reduced connectivity model, as returned by
extract_5th_order_reduced()axial_coord_data (int) – Index of axial coordinate axis, as returned by
extract_5th_order_reduced()pos_map_file (str/list-like) – Optional position mapping file pointing to a position mapping model (.json) or voxel data map (.nrrd); one or two files for source/target node populations may be provided
plot_model_ovsampl (int) – Oversampling factor w.r.t. data binning for plotting model output (must be >=1)
plot_model_extsn (int) – Range extension in multiples of original data bins in each direction for plotting model output (must be >=0)