cpm: A python library for theory-driven modelling in computational psychiatry.

Dome, Lenard; Hezemans, Frank H; Kadri, Kenza; Wagner, Ben J; Webb, Andrew; Hauser, Tobias U · PLoS Comput Biol · 2026

Where this comes from

Abstract

The Computational Psychiatry Modelling (cpm) toolbox is a Python library for theory-driven modelling in computational psychiatry and cognitive (neuro-)science. cpm integrates a wide range of established approaches into a single framework. It is designed to be accessible to both expert and non-expert modellers in order to conduct cutting-edge computational modelling, while adhering to best practices. The toolbox provides a flexible, modular architecture that adjusts to different needs. It covers a wide range of problems (such as risky decision-making, reward/punishment learning, perceptual metacognition), models (including those based on associative, reinforcement learning, and signal detection theories), and methods (such as hierarchical parameter estimation using empirical and variational Bayesian techniques). Such a customisable toolbox aims to lower the barrier for beginners and to facilitate access to advanced modelling approaches in psychiatry and beyond.