Skip to main content

A toolbox for data analysis using the attentional drift-diffusion model.

Project description

This toolbox can be used to perform model fitting and to generate simulations for the attentional drift-diffusion model (aDDM), as well as for the classic version of the drift-diffusion model (DDM) without an attentional component.

Prerequisites

aDDM-Toolbox supports Python 2.7 only and requires the following libraries: * deap * matplotlib * numpy * pandas * scipy

Installing

$ pip install addm_toolbox

Running tests

To make sure everything is working correctly after installation, try (from a UNIX shell, not the Python interpreter):

$ addm_run_tests

This should take a while to finish, so maybe go get a cup of tea :)

Getting started

To get a feel for how the algorithm works, try:

$ addm_demo --display-figures

You can see all the arguments available for the demo using:

$ addm_demo --help

Here is a list of useful scripts which can be similarly run from a UNIX shell: * addm_demo * ddm_pta_test * addm_pta_test * addm_pta_mle * addm_pta_map * addm_simulate_true_distributions * addm_basinhopping * addm_genetic_algorithm * ddm_mla * addm_mla

You can also have a look directly at the code in the following modules: * addm.py contains the aDDM implementation, with functions to generate model simulations and obtain the likelihood for a given data trial. * ddm.py is equivalent to addm.py but for the DDM. * addm_pta_test.py generates an artificial data set for a given set of aDDM parameters and attempts to recover these parameters through maximum a posteriori estimation. * ddm_pta_test.py is equivalent to addm_pta_test.py but for the DDM. * addm_pta_mle.py fits the aDDM to a data set by performing maximum likelihood estimation. * addm_pta_map.py performs model comparison for the aDDM by obtaining a posterior distribution over a set of models. * simulate_addm_true_distributions.py generates aDDM simulations using empirical data for the fixations.

Common issues

Make sure you are using the toolbox under Python 2.7, not Python 3.

If you get a Python RuntimeError with the message “Python is not installed as a framework.”, try creating the file ~/.matplotlib/matplotlibrc and adding the following code:

backend: TkAgg

Authors

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the COPYING file for details.

Acknowledgments

This toolbox was developed as part of a research project in the Rangel Neuroeconomics Lab at the California Institute of Technology.

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

addm_toolbox-0.1.10.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

addm_toolbox-0.1.10-py2-none-any.whl (1.1 MB view details)

Uploaded Python 2

File details

Details for the file addm_toolbox-0.1.10.tar.gz.

File metadata

File hashes

Hashes for addm_toolbox-0.1.10.tar.gz
Algorithm Hash digest
SHA256 0fab518c982f1aff6cb3d60b6b01ef3aaed5e5587e49b5951e8669d190e699eb
MD5 ff610eff64f1b7bf536af3367faa3eff
BLAKE2b-256 bc7df009f81df67952c6005b0c2557011fa4a097fb51aa98913138eec4872c57

See more details on using hashes here.

File details

Details for the file addm_toolbox-0.1.10-py2-none-any.whl.

File metadata

File hashes

Hashes for addm_toolbox-0.1.10-py2-none-any.whl
Algorithm Hash digest
SHA256 f7060442ad90611d920b412cd3cd26088ab6f85f6a61fc36bb40a6cd93a24ff3
MD5 9817a93bab86e2473536cfdc63b2bb4d
BLAKE2b-256 e4f0a80ece42826d257f50a9ed2ffb68dcb2b4e687490db9dd46811aa582946c

See more details on using hashes here.

Supported by

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