Sample code for a Convolutional Neural Mass Model
The sample code provided here plots the results of a single optimized neural mass. This code was tested using Python 3.8.
-
plot_CNMM_PSO_results.py
- Main script that executes the CNMM to predict 8,000 ms of validation spike density data.
- Also plots results summarizing the Particle Swarm Optimization evolution, individual kernels, and kernel outputs
-
CNMM.py
- Class implementation of the CNMM for spike density prediction
-
CNMM_current.py
- Extended implementation of CNMM class but for transmembrane current prediction. Inherits from CNMM.py
-
data_inputoutputdata_multi-res_gridfields_0-80cm_noise_50Hzmax.h5
- HDF5 file containing the input/output spike density data for the CNMM.
- Note: please unzip the 2 part file
-
CNMM_PSO_0.50yres_0.20xres_2.0tres_bby13_bbx11_2025-08-08_14-08
- Directory holding sample optimization data and parameters