Skip to main content

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,
                    layer1_size = 1000,
                    layer2_size = 1000,
                    layer3_size = 1000,
                    layer4_size = 1000,
                    layer5_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

build_a_brain-1.0.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

build_a_brain-1.0.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file build_a_brain-1.0.0.tar.gz.

File metadata

  • Download URL: build_a_brain-1.0.0.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

Hashes for build_a_brain-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f7105a72507d5f982995fb4b1ef37588029b7f45a22f48ec77d06b97113cbe2f
MD5 5cfd65847d04ced7647f42e7abfef01d
BLAKE2b-256 d368a22e39c89c26fe8c3b5409f5a2138d68597071dc8b6b059f39c588f90f68

See more details on using hashes here.

File details

Details for the file build_a_brain-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: build_a_brain-1.0.0-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

Hashes for build_a_brain-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae65ec7ea7489f0da736f5fe76b04254e003593b24c5ccf9d8466469966dfe32
MD5 acf20a051bd54dac7f38ba928528eab4
BLAKE2b-256 ecac9531f2d68afd877c0b5c28a4a185ceec7ba7f36eb6f93203fd54bb50bc7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page