Skip to content

Reference repository for code used in our NBDT publication on the dynamic clicks task

License

Notifications You must be signed in to change notification settings

aernesto/NBDT_dynamic_clicks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NBDT_dynamic_clicks

This is the reference repository for code used in our NBDT publication on the dynamic clicks task PRE-PRINT. The main programing languages used are MATLAB (version 2017+) and Octave (version 4.2.2). Python 3 was also used to produce static clicks datasets, as explained below.

Figures 1-3

The high-level algorithms for producing figures 1 through 3 were described in the paper. The files simulate_linDE.m, simulate_DE.m and simulate_crossover_effect.m contain code that was used to produce these figures.

The file simulate_linDE.m is an example implementation of how the clicks stimulus and the responses of the linear model may be simulated.

The file simulate_DE.m is an example implementation of how the clicks stimulus and the responses of the nonlinear model may be simulated.

The file simulate_crossover_effect.m is an example implementation of how the cross-over effect from figure 2 may be computed.


DISCLAIMER: For the remainder of the figures, the code is spread out across several repositories. If you want to reproduce them, you will need to:

For questions regarding figures 4 and 5, contact Adrian Radillo at the following email:
adrian dot radillo at pennmedicine dot upenn dot edu

Figures 4A-B

First, a 1-Million trial database of clicks stimuli validation2.h5 was produced. You may download it from here. If you'd rather produce yourself an equivalent database, you may follow the instructions here, bearing in mind that the validation2.h5 dataset had the following parameter settings:
low click rate = 5 Hz, high click rate = 20 Hz, stimulus hazard rate = 1 Hz.

Then, the accuracy values of the different models in the figures were computed with this script, which outputs a file named accuracy_figure_9.mat. This .mat file was eventually used by this script which generates the actual plots.

Figures 4C-D

The database used for the fits is S3lr5h1T2tr10000sp1000.h5 and may be downloaded here. Just as for the validation2.h5 database previously mentioned, you can reproduce your own equivalent database following the instructions here, bearing in mind that the S3lr5h1T2tr10000sp1000.h5 dataset had the following parameter settings:
low click rate = 5 Hz, high click rate = 20 Hz, stimulus hazard rate = 1 Hz, total number of trials in database = 10,000.

The MAP estimates were computed with this script, which uses the S3lr5h1T2tr10000sp1000.h5 file as input and outputs 4 .mat files.

In turn, these .mat files are read by this script to produce the whisker plots from panels C and D.

Figure 4E

The fits from the .mat files mentioned in the previous section were collected in this .csv file. This .csv file is then read by the code mentioned in the next paragraph.

Panel E from figure 4, corresponding to the relative error resulting from the fits may be reproduced by running only the code in this script that relates to the 3rd subplot.

Figure 5

The function that produces each individual panel is this one. One of its arguments is a .mat file outputted by one of the following scripts, depending on the model pair:

The clicks database on which percent match is maximized is validation2.h5, already mentioned above.

Releases

No releases published

Packages

No packages published

Languages