Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Extensible drift diffusion modeling for Python

Project description

PyDDM - A drift-diffusion model simulator

Build Status


PyDDM is a simulator and modeling framework for drift-diffusion models (DDM), with a focus on cognitive neuroscience.

Key features include:

  • Models solved numerically using Crank-Nicolson to solve the Fokker-Planck equation (Backward Euler, analytical solutions, and particle simulations also available)
  • Arbitrary functions for drift rate, noise, bounds, and initial position distribution
  • Arbitrary loss function and fitting method for parameter fitting
  • Optional multiprocessor support
  • Optional GUI for debugging and gaining an intuition for different models
  • Convenient and extensible object oriented API allows building models in a component-wise fashion
  • Verified accuracy of simulations using novel program verification techniques

See the documentation, FAQs, or tutorial for more information. You can also sign up for release announcements by email.

Please note that PyDDM is still beta software so you may experience some glitches or uninformative error messages.


Normally, you can install with:

$ pip install pyddm

If you are in a shared environment (e.g. a cluster), install with:

$ pip install pyddm --user

If installing from source, download the source code, extract, and do:

$ python3 install

System requirements

  • Python 3.5 or above
  • Numpy version 1.9.2 or higher
  • Scipy version 0.15.1 or higher
  • Matplotlib
  • Paranoid Scientist
  • Pathos (optional, for multiprocessing support)


Please report bugs to This includes any problems with the documentation. PRs for bugs are greatly appreciated.

Feature requests are currently not being accepted due to limited resources. If you implement a new feature in PyDDM, please do the following before submitting a PR on Github:

  • Make sure your code is clean and well commented
  • If appropriate, update the official documentation in the docs/ directory
  • Ensure there are Paranoid Scientist verification conditions to your code
  • Write unit tests and optionally integration tests for your new feature (
  • Ensure all existing tests pass

For all other questions or comments, contact


All code is available under the MIT license. See LICENSE.txt for more information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyddm, version 0.5.1
Filename, size File type Python version Upload date Hashes
Filename, size pyddm-0.5.1-py3-none-any.whl (73.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyddm-0.5.1.tar.gz (59.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page