Builds a LIF neural network
Project description
Overview:
This package generates a simple spiking network model with a leaky integrate and fire (LIF) approach. The spiking model can be customized and outputs spiking activity over time of each neuron in the form of a raster plot. Additionally, membrane potential voltages are stored for each neuron at each step of the simulation.
Features:
The model is customizable with the aid of a user friendly interface. The model consists of 5 layers where the user defines the following:
- number of neurons in each layer
- connectivity matrix of each layer to itself and other layers
- stimulation layer
- percent of neurons in stimulation layer reciving stimulation
- run time of stimulation in miliseconds
Setup and installation
Dependencies: To use the package, first install the following pacakges and make sure you are using python version 3.11 or later:
pip install numpy
pip install matplotlib
pip install tk
Install the package:
pip install build_a_brain
User guide:
To use the interactive interface, the function can be ran in either the command line or in a jupyter notebook:
build_a_brain.build_network_interface()
To output the network object, spikes over time, and voltages over time, it is reccomended to use a jupyter notbook. Below is an example of a neural network that can be generated.
net, spikes, voltages = run_simulation(-1, -1, num_steps = 100,
layer_1_size = 1000,
layer_2_size = 1000,
layer_3_size = 1000,
layer_4_size = 1000,
layer_5_size = 1000,
connectivity_matrix = np.array([[0,0,0.02,0.02,0.01],
[0.001,0.001,0,0.001,0.01],
[0.001,0.001,0.01,0,0.001],
[0.01,0.01,0.01,0,0.01],
[0.001,0.001,0.01,0.001,0]]),
driving_layer = 3,
driving_neuron_nums = 20)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file build_a_brain-1.0.1.tar.gz.
File metadata
- Download URL: build_a_brain-1.0.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d19de123cbcd4ccd52f5d5de3f4964be9e5931380f0df3f6150a2d3015a0e5d
|
|
| MD5 |
8631f75fa55b6373175b2cfa8562a396
|
|
| BLAKE2b-256 |
71f41f3003c6b5e3f039dbd313419570d885014ae98ee3f902732ecd46828b41
|
File details
Details for the file build_a_brain-1.0.1-py3-none-any.whl.
File metadata
- Download URL: build_a_brain-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8fabaef42b44345c61970cc9da19a4eda6ae466c7127ac232e9ade377207385
|
|
| MD5 |
83792f01ca98afe6871895d69dccb714
|
|
| BLAKE2b-256 |
3a3e938ed8fe8283f004e1b89dc03b138c65ab0c0d6c2f2ee4d1c916595c243d
|