Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 2.67 KB

README.md

File metadata and controls

38 lines (29 loc) · 2.67 KB

Coursework: Dynamical Complexity

Done by: Carlos Villalobos Sanchez, Fatima M S Al-ani, Gita A Salsabila

Files

  • README.md: instructions for running the code
  • iznetwork.py: given iznetwork class to simulate
  • main.py: the main program simulating how modular network works

Running the code

  1. To run the code, use the following command within current directory: python3 main.py. The program will create a modular network based on the defined parameters and call the Simulating() function to show the behaviour of the network by the connectivity matrix, the raster plot, and the mean firing rate based on given T (duration) and p (rewiring probability).

Program Structure

Classes

Module :

The class used for constructing each modules within the modular network by inheriting the iznetwork class.

Methods:

  • set_network_pars: setting the neurons parameters (a,b,c,d) within a single module
  • setCurrentWithBackgroundFiring: setting the background firing for random neurons within a single module
  • set_Connections_within: setting connection between neurons within a single module

Connection

The class represents a connection between modules.

Community

Methods:

  • set_connection: setting Connection class between modules by setting the weight and the delay of the connection
  • set_connection_btw_modules: setting the connection between each type of modules based on the projection pattern (focal for excitatory-inhibitory, diffuse for inhibitory-exitatory and inhibitory-inhibitory).
  • make_modular_small_world: creating the small world network of by rewiring connections between exitatory modules using try_rewiring method
  • try_rewiring: deciding whether the rewiring will take place or not based on random probability, if yes then the rewire method will do the rewiring, if not the weight and the delay of the Connection will stay the same
  • rewire: rewiring the existing connection by assigning the new destination neuron with random neuron from other modules.
  • generate_final_network: combining all connected modules to make one big module that become our final network
  • plot_connections: plotting the connectivity matrix and the weight of the connections

Method

  • Simulating(): simulating the behaviour of our network during certain duration 'T' by giving 'p' (rewiring probability). This method will shows the connectivity matrix to illustrate the structure of the final networks, the raster plot to show which parts of the network fires in certain time, and the mean firing rate to show number of spikes of each module within each 50ms windows shifted every 20ms.