Connectome-interpreter

Latest version: v2.4.1

Safety actively analyzes 715199 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.3.0

🚀 New Features
There is now more support for visualise neuron activations after modelling:
- `get_input_activation()` (for input) and `get_neuron_activation()` (for output) get activations from selected neurons (in groups of choice) for all timepoints into a dataframe. This dataframe can be used in `get_ngl_link()`, to visualise activation of select neurons across time in neuroglancer.
- With `get_activations_for_path()`, it is now possible to e.g. get activation of timepoints 3-5, based on a path with 2 layers.
- `activated_path_for_ngl()` takes output from `get_activations_for_path()`, and turn it into a dataframe that can be used in `get_ngl_link()`, to visualise the propagation of activity in a path.
- `path_for_ngl()` takes a paths dataframe (without neuron activations), and turn it into a dataframe that can be used in `get_ngl_link()`, to visualise the propagation of signal in a path.

🐛 Bug Fixes
- It was previously noted in docs that model output included external input activations. This is now true...
- fix bug in group_paths when group value is int

**Full Changelog**: https://github.com/YijieYin/connectome_interpreter/compare/v2.2.0...v2.3.0

2.2.0

🚀 New Features
- You've run the model, but how to get activations for the path you care about? `get_activations_for_path()` is now available.
- The code for reading pre-multiplied matrices is quite chunky in colab notebooks - substitute with `read_precomputed()` - so long as you have the precomputed data downloaded (into the colab session) - see example notebooks.
- You can now have the activation values labelled in `plot_output_grid()`, and can get the data with `output_grid_data()`.

🐛 Bug Fixes
- In modelling, the input now is simply thresholded between model_threshold and 1, before being passed into the model. No more tanh.
- Input should now be fed in with the correct timing...

2.1.0

🚀 New Features
- Who doesn't want to make some actual function-related predictions based on the connectome? Now you can! Look for [XOR](https://en.wikipedia.org/wiki/Exclusive_or) computation using `find_xor()` in 3-layered paths. XOR circuit based on [Wang et al. 2024](https://www.biorxiv.org/content/10.1101/2024.09.24.614724v2).
- What does non-linearity actually do? With `make_grid_inputs()` and `plot_output_grid()` you can quickly visualise how the output changes across timepoints when you vary the strength of two inputs through a non-linear model. Inspiration from [TensorFlow Playground](https://playground.tensorflow.org/).
- `compare_layered_paths()` overlays two paths, to compare between them - small steps towards comparative connectomics.

🐛 Bug Fixes
- `activation_maximisation()` no longer takes too much RAM - the computational graph of `model.activations` was staying, which shouldn't have (as expected, things don't work as expected on the first try...)

**Full Changelog**: https://github.com/YijieYin/connectome_interpreter/compare/v2.0.0...v2.1.0

2.0.0

🚀 New Features
- both `MultilayeredNetwork` and `activation_maximisation()` can now take batched input. And there are functions like `activations_to_df_batched()` to help process the input;
- target specification has changed: now users can set target neurons' activations to be *any value* (between 0 and 1), using either a dictionary or a dataframe (which allows different targets in different batches);
- `get_neuron_activation()` gets the activation of selected neurons across timepoints from the model activations, regardless of its activation/connectivity;
- It is no longer necessary to spell out the long module names... just do `from connectome_interpreter import *` and you're all set.
- `map_to_experiment()` now directly multiplies e.g. vectors of 1) connectivity input from glomeruli; and 2) glomeruli activation upon stimulus;
- for `group_paths()`, allow calculating average connectivity within those already connected. This is useful for e.g. optic lobe analysis where an input neuron might occupy 50% of a `T4a` neuron's input, but a tiny amount for the total input `T4a` cell type receives.


🐛 Bug Fixes
- to_nparray() sneakily sorted the input (through `unique()`). Made this optional (if `unique = True` (default) then sorts too).

**Full Changelog**: https://github.com/YijieYin/connectome_interpreter/compare/v1.13.1...v2.0.0

1.13.1

🐛 Bug Fixes
- In `group_paths()`, fix when group is an integer (by automatically converting them to str);
- In `remove_excess_neurons()`, if the path has no connections, raise error;
- In `get_ngl_link()`:
- when there is only one neuron per layer, does not normalise;
- and the same function now takes a `pd.Series` in addition to `pd.DataFrame` as argument;
- fixed bug when grouping.

And added types in some functions.

**Full Changelog**: https://github.com/YijieYin/connectome_interpreter/compare/v1.13.0...v1.13.1

1.13.0

🚀 New Features
- first step towards comparative connectomics: `compare_connectivity()` compares connectivity;
- `get_ngl_link()` can now take a long (in addition to wide) dataframe;
- `effective_conn_from_paths()` takes a path, and calculates the effective connectivity only based on the path; (`signed_effective_conn_from_paths()` also exists);
- `coin.__version__` now works...

🐛 Bug Fixes
- `activations_to_df()` now works when grouped by integer neuron ids.




**Full Changelog**: https://github.com/YijieYin/connectome_interpreter/commits/v1.13.0

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.