https://github.com/DevComPsy/cpm/releases
Install
You can install the new release straight from the PyPi repository:
pip install cpm-toolbox
Added
- Introduce a third-party connector for the
cpm.generators.Wrapperclass to facilitate integration with external optimisation procedures - Add validation for ‘observed’ column in Wrapper class to ensure it exists before running model or computing loss
- Add warnings to inform users if ‘observed’ column is missing in the data provided to Wrapper class
- Added detailed guidance on fitting the models (PTSM, PTSM1992, and PTSM2025) to data, including recommendations for setting the temperature parameter, handling overflow warnings, and normalizing utility values to avoid numerical instability.
- Added documentations for the datasets included in
cpm.datasets, detailing the experimental procedure, data structure and usage (#69) @FloorJBurghoorn - Added
cpm.utils.data.convert_to_RLRWdata conversion utility to create dataframes compatible withcpm.applications.reinforcement_learning.RLRW - Added
cpm.utils.data.convert_to_PTSMdata conversion utility to create dataframes compatible withcpm.applications.decision_makin.RLRW
Changed
cpm.core.parallel.execute_parallelnow suppresses ipyparallel cluster status messages by setting log level to ERRORcpm.core.parallel.execute_parallellibrariesparameter default is no longer a mutable list- Update
cpm.applications.reinforcement_learning.RLRWclass to usenumpy.asarrayfor thevaluesparameter, ensuring compatibility with numpy=>2.0 - Increased bandit task dataset size
- Update test units for
cpm.applications.reinforcement_learning.RLRWto include handling of new changes, such as usingnumpy.asarrayforvaluesand adding an ‘observed’ column in the test dataset - Improved the error messages in check_nan_and_bounds_in_input to provide more actionable feedback when encountering NaN or Inf values in predicted or observed data, including likely causes and suggested remedies.
- Display option now blocks all prints in optimization module (#71) @tzukpolinsky
Fixed
- Fix
cpm.core.parallel.in_ipynbto correctly distinguish Jupyter notebooks from IPython terminal sessions by checking forZMQInteractiveShell - Fix
cpm.core.parallel.execute_parallelipyparallel cluster not being shut down after execution, causing engine process leaks - Fix wrong probabilities for generating data in
cpm.applications.decision_making.PTSM2025model #67 @FloorJBurghoorn - Fix matplotlib>=3.10 dependency mismatch errors upon loading
cpmby removing unused imports incpm.utils.metad - Fix the usage of ppt_identifier in Minimize class (#72) @tzukpolinsky
- Fix usage of NaN in
cpm.models.decision.SoftMax - Fix the import for
cpm.models.learning
Removed
- Removed unused imports in
cpm.utils.metadto prevent dependency issues with matplotlib>=3.10 - Removed
cpm.models.learning.KernelUpdatedue to inconsistencies between equations reported in paper and code available in GitHub

Leave a Reply