New models (three variants of Prospect Theory), new features (more ways to manage parameters, more model components to use), and of course bug fixes. If you want to make your computational modelling reproducible and robust, check out and install the new version of *cpm*:
https://github.com/DevComPsy/cpm/releases/tag/0.23.18
Install
You can install the new release straight from the PyPi repository:
pip install cpm-toolbox
Added
- Add input validation and error handling in all
cpm.optimisation.minimisemethods - Add test units for
cpm.optimisation.minimise - Added three models based on Prospect Theory:
cpm.applications.decision_making.PTSM,cpm.applications.decision_making.PTSM1992, andcpm.applications.decision_making.PTSM2025with the help of @BenJonathanWagner - The
cpm.generators.Parametersclass now supports None-type parameters, allowing for more flexible model configurations - The
cpm.generators.Parametersclass now supports the use of user-defined functions as attributes in addition to freely-varying parameters - Add
cpm.datasets.load_risky_choicesfunction to load built-in risky choices dataset from @BenJonathanWagner and @tuhauser - Expanded
cpm.models.activation.ProspectUtilityclass to include additional parameters for more flexible modeling of decision-making under risk, more closely approximating Tversky & Kahneman’s (1992) version of Prospect Theory
Fixed
- Fix
simulation_exportfunction to handle DataFrame output correctly - Fix
detailed_pandas_compilerfunction to support new numpy versions - Fix probability adjustements in
cpm.optimisation.minimise.LogLikelihoodmethod to ensure correct parameter estimates pointed out by @BenJonathanWagner and @tuhauser - Resolved a bug in the
detailed_pandas_compilerfunction to handle various data types and ensure proper DataFrame formatting incpm/core/data.py.

Leave a comment