v0.23.18 – New Prospect Models, improved parameter management, and a few bug fixes

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.minimise methods
  • Add test units for cpm.optimisation.minimise
  • Added three models based on Prospect Theory: cpm.applications.decision_making.PTSM, cpm.applications.decision_making.PTSM1992, and cpm.applications.decision_making.PTSM2025 with the help of @BenJonathanWagner
  • The cpm.generators.Parameters class now supports None-type parameters, allowing for more flexible model configurations
  • The cpm.generators.Parameters class now supports the use of user-defined functions as attributes in addition to freely-varying parameters
  • Add cpm.datasets.load_risky_choices function to load built-in risky choices dataset from @BenJonathanWagner and @tuhauser
  • Expanded cpm.models.activation.ProspectUtility class 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_export function to handle DataFrame output correctly
  • Fix detailed_pandas_compiler function to support new numpy versions
  • Fix probability adjustements in cpm.optimisation.minimise.LogLikelihood method to ensure correct parameter estimates pointed out by @BenJonathanWagner and @tuhauser
  • Resolved a bug in the detailed_pandas_compiler function to handle various data types and ensure proper DataFrame formatting in cpm/core/data.py.

Comments

Leave a comment