GithubHelp home page GithubHelp logo

aernesto / nbdt_dynamic_clicks Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 11 KB

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

Home Page: https://arxiv.org/abs/1902.01535

License: MIT License

MATLAB 100.00%
neuroscience-methods theoretical-neuroscience applied-mathematics model-fitting decision-making

nbdt_dynamic_clicks's Introduction

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.

nbdt_dynamic_clicks's People

Contributors

aernesto avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.