Skip to main content

aDDM Toolbox

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 (and Python 3.6 tentatively – please report any bugs). The following libraries are required:

  • deap

  • future

  • 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_toolbox_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

If you get errors while using the toolbox under Python 3, try it with Python 2.7.

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.

Metadata

Release files for addm-toolbox 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for addm-toolbox 0.1.12
File Size Uploaded Provenance
addm_toolbox-0.1.12.tar.gz 1.0 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for addm-toolbox 0.1.12
File Interpreter ABI Platform
addm_toolbox-0.1.12-py2-none-any.whl Python 2 none any Details

Total release size: 2.1 MB

Release files / addm_toolbox-0.1.12.tar.gz

Download URL addm_toolbox-0.1.12.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
9b3c0c0f292d037ff80116caaa739d65f68bd3135c879d5585a600fc3d93dc1a
BLAKE2b-256 checksum
How to use checksums
1b0382f9ad30f1b6b78ea2b1d8aa13ea8dc438d5ec8286366b7f96d376ff21a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / addm_toolbox-0.1.12-py2-none-any.whl

Download URL addm_toolbox-0.1.12-py2-none-any.whl
Size 1.1 MB
Tags Python 2
SHA-256 checksum
How to use checksums
3c35a0e0bb8f4f0c215e7a3e3c46bd299e0a6178c387f8ba7af34c59ba998d66
BLAKE2b-256 checksum
How to use checksums
0f5121bc0b3ded0212ebf4f300f95806af8822cc50dd8b49559e560e4bb2c83f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for addm-toolbox 0.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page