cpm-toolbox 0.23.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cpm_toolbox-0.23.7/CHANGELOG.md +99 -0
- cpm_toolbox-0.23.7/LICENSE +661 -0
- cpm_toolbox-0.23.7/LICENSES-BUNDLE +19 -0
- cpm_toolbox-0.23.7/MANIFEST.in +1 -0
- cpm_toolbox-0.23.7/PKG-INFO +132 -0
- cpm_toolbox-0.23.7/README.md +102 -0
- cpm_toolbox-0.23.7/cpm/__init__.py +25 -0
- cpm_toolbox-0.23.7/cpm/__version__.py +1 -0
- cpm_toolbox-0.23.7/cpm/applications/__init__.py +2 -0
- cpm_toolbox-0.23.7/cpm/applications/reinforcement_learning.py +148 -0
- cpm_toolbox-0.23.7/cpm/applications/signal_detection.py +644 -0
- cpm_toolbox-0.23.7/cpm/core/__init__.py +0 -0
- cpm_toolbox-0.23.7/cpm/core/data.py +212 -0
- cpm_toolbox-0.23.7/cpm/core/diagnostics.py +159 -0
- cpm_toolbox-0.23.7/cpm/core/exports.py +43 -0
- cpm_toolbox-0.23.7/cpm/core/generators.py +119 -0
- cpm_toolbox-0.23.7/cpm/core/optimisers.py +96 -0
- cpm_toolbox-0.23.7/cpm/core/parallel.py +121 -0
- cpm_toolbox-0.23.7/cpm/cpm.py +0 -0
- cpm_toolbox-0.23.7/cpm/datasets/__init__.py +3 -0
- cpm_toolbox-0.23.7/cpm/datasets/base.py +88 -0
- cpm_toolbox-0.23.7/cpm/datasets/data/__init__.py +0 -0
- cpm_toolbox-0.23.7/cpm/datasets/data/bandit_small.csv +2305 -0
- cpm_toolbox-0.23.7/cpm/datasets/data/risky_choices.csv +301 -0
- cpm_toolbox-0.23.7/cpm/generators/__init__.py +11 -0
- cpm_toolbox-0.23.7/cpm/generators/parameters.py +650 -0
- cpm_toolbox-0.23.7/cpm/generators/simulator.py +178 -0
- cpm_toolbox-0.23.7/cpm/generators/wrapper.py +188 -0
- cpm_toolbox-0.23.7/cpm/hierarchical/__init__.py +4 -0
- cpm_toolbox-0.23.7/cpm/hierarchical/empirical.py +387 -0
- cpm_toolbox-0.23.7/cpm/hierarchical/variational.py +685 -0
- cpm_toolbox-0.23.7/cpm/models/__init__.py +10 -0
- cpm_toolbox-0.23.7/cpm/models/activation.py +360 -0
- cpm_toolbox-0.23.7/cpm/models/decision.py +420 -0
- cpm_toolbox-0.23.7/cpm/models/learning.py +546 -0
- cpm_toolbox-0.23.7/cpm/models/utils.py +48 -0
- cpm_toolbox-0.23.7/cpm/optimisation/__init__.py +8 -0
- cpm_toolbox-0.23.7/cpm/optimisation/bads.py +276 -0
- cpm_toolbox-0.23.7/cpm/optimisation/fmin.py +497 -0
- cpm_toolbox-0.23.7/cpm/optimisation/free.py +256 -0
- cpm_toolbox-0.23.7/cpm/optimisation/genetic.py +201 -0
- cpm_toolbox-0.23.7/cpm/optimisation/minimise.py +349 -0
- cpm_toolbox-0.23.7/cpm/utils/__init__.py +0 -0
- cpm_toolbox-0.23.7/cpm/utils/data.py +77 -0
- cpm_toolbox-0.23.7/cpm/utils/metad.py +278 -0
- cpm_toolbox-0.23.7/cpm_toolbox.egg-info/PKG-INFO +132 -0
- cpm_toolbox-0.23.7/cpm_toolbox.egg-info/SOURCES.txt +63 -0
- cpm_toolbox-0.23.7/cpm_toolbox.egg-info/dependency_links.txt +1 -0
- cpm_toolbox-0.23.7/cpm_toolbox.egg-info/requires.txt +8 -0
- cpm_toolbox-0.23.7/cpm_toolbox.egg-info/top_level.txt +5 -0
- cpm_toolbox-0.23.7/pyproject.toml +55 -0
- cpm_toolbox-0.23.7/setup.cfg +7 -0
- cpm_toolbox-0.23.7/test/__init__.py +0 -0
- cpm_toolbox-0.23.7/test/applications/test_reinforcement_learning.py +127 -0
- cpm_toolbox-0.23.7/test/applications/test_signal_detection.py +82 -0
- cpm_toolbox-0.23.7/test/datasets/test_datasets.py +74 -0
- cpm_toolbox-0.23.7/test/generators/test_parameters.py +218 -0
- cpm_toolbox-0.23.7/test/generators/test_simulator.py +102 -0
- cpm_toolbox-0.23.7/test/generators/test_wrapper.py +56 -0
- cpm_toolbox-0.23.7/test/models/test_activation.py +73 -0
- cpm_toolbox-0.23.7/test/models/test_decision.py +122 -0
- cpm_toolbox-0.23.7/test/models/test_learning.py +98 -0
- cpm_toolbox-0.23.7/test/models/test_utils.py +53 -0
- cpm_toolbox-0.23.7/test/test_cpm.py +47 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Detect parallel method to use given environment (support for parallelisation on Jupyter Notebooks)
|
|
13
|
+
- Provide a complete n-dimensional and k-arm reinforcement learning model for multi-armed bandit tasks in applications
|
|
14
|
+
- Add support for '>' and '<' operator in Value type
|
|
15
|
+
- Add meta-_d_ to applications
|
|
16
|
+
- Provide utility functions for data preprocessing with meta-_d_ type models
|
|
17
|
+
- Introduce new likelihoods (`multinomial` and `product`)
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Fix multi-outcome log-likelihood calculation in `cpm.optimisation.minimise.LogLikehood.categorical` method
|
|
22
|
+
- Fix pandas groupby method for parallelization when in Jupyter Notebook
|
|
23
|
+
- Fix magnitude is not taking effect in Nominal
|
|
24
|
+
- Fix choice kernel choice should check whether computations still need to carry out
|
|
25
|
+
- Fix column names in `cpm.applications.signal_detection.EstimatordMetaD` class
|
|
26
|
+
- Fix `detailed_pandas_compiler` bug to handle various data types and ensure proper DataFrame formatting
|
|
27
|
+
- Fix column name issues in `cpm.applications.signal_detection.EstimatordMetaD` class
|
|
28
|
+
- Resolved a bug in the `detailed_pandas_compiler` function to handle various data types and ensure proper DataFrame formatting in `cpm/core/data.py`.
|
|
29
|
+
- Fix Issue [#55](https://github.com/DevComPsy/cpm/issues/55): AttributeError: np.float_ was removed in NumPy 2.0 during export
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Improved error handling in `cpm.applications.signal_detection.EstimatordMetaD`
|
|
34
|
+
- Improved error handling and added input validation in several methods, such as the `detailed_pandas_compiler` function and parameter bounds handling in `cpm/generators/parameters.py`
|
|
35
|
+
- Allow for larger variations in the estimation of the Hessian matrix in test units
|
|
36
|
+
- Changed Softmax and Sigmoid function input shape requirements to ensure they accept 1D arrays only, with a warning for 2D arrays
|
|
37
|
+
|
|
38
|
+
## [Unreleased] <=0.18.4
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- d42e0689: Fmin can incorporate priors into its log likelihood function
|
|
43
|
+
- 0a9281f6: Fmin now also returns the hessian matrix of the minimisation function
|
|
44
|
+
- 71937516: Parameters can now output parameter bounds if parameter has specified priors
|
|
45
|
+
- df4cac2c: FminBound implements a bounded parameter search with L-BFGS-B
|
|
46
|
+
- 2fc82638: Parameters now output freely varying parameter names
|
|
47
|
+
- abb837ff: Fmin can now reiterate the minimisation process for multiple starting points
|
|
48
|
+
- abb837ff: Fmin can now add ppt identifier to the output of the minimisation process
|
|
49
|
+
- 2254dbd6: Regenerate initial guesses in Fmin-type optimisation when reset (can be turned off)
|
|
50
|
+
- 2254dbd6: EmpiricalBayes creates new starting points for each iteration of the optimisation
|
|
51
|
+
- 6780753c: Wrapper updates variables in parameters that are also present in model output
|
|
52
|
+
- c8cd4c7c: Simulator.generate() method now expects users to specify what variable to generate
|
|
53
|
+
- 7b2571b1: Parameter Recovery now supports the generation of user-specified dependent variables
|
|
54
|
+
- 27d16f6b: add squared errors to minimise modules
|
|
55
|
+
- b921be30: Added Bayesian Adaptive Direct Search (BADS) as an optimization method
|
|
56
|
+
- 42db58b6: DifferentialEvolution now supports parallelisation
|
|
57
|
+
- 6312ad99: more thorough computation of inverse Hessian matrix and log determinant of Hessian matrix
|
|
58
|
+
- 289cde73: made update_priors usable for both normal and truncated normal priors
|
|
59
|
+
- ec2a181c: Implementing Piray's Variational Bayes method
|
|
60
|
+
- 2d0c716d: Added convergence diagnostic plots for hierarchical methods
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
|
|
64
|
+
- 2477a127: Optimisers now only store freely varying parameter names
|
|
65
|
+
- b7ed8069: Refactored Bads to implement up-to-date changes (changed parallelisation, works with new methods in Parameters, implements priors)
|
|
66
|
+
- b921393d: rewrote piecewise power function to compute utilities to avoid numpy warnings
|
|
67
|
+
- 634b0e87: corrected estimation of parameter variances and means
|
|
68
|
+
|
|
69
|
+
### Removed
|
|
70
|
+
|
|
71
|
+
- 6780753c: Wrapper summary output is removed due to redundancy
|
|
72
|
+
- f47c684a: remove the redundant pool.join and pool.close
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- e334d6e8: fix parameter class prior function is not carried over by copy method
|
|
77
|
+
- e195266f: fix Wrapper class parameter updates, where list or array inputs deleted Value class attributes of parameters
|
|
78
|
+
- 6780753c: Wrapper now correctly finds the number of trials in the model output
|
|
79
|
+
- 5f5432bd: -Inf in Loglikelihood is turned into np.finfo(np.float64).min to avoid NaN in the likelihoods
|
|
80
|
+
- a84ae319: Parameters now ignores attributes without prior when calculating the PDF
|
|
81
|
+
- 32520016: Simulator generated returns an empty array
|
|
82
|
+
- 7a276be6: Parameter Recovery quired the wrong dimension to establish what parameters to recover
|
|
83
|
+
- cd6ef8cb: Fix naming clashes in parameter recovery
|
|
84
|
+
- 57c6a3c0: Fix parallel=False still spawns processes in Optimizations
|
|
85
|
+
- 42db58b6: Fixing the issue when likelihood is -inf (bounding to minimum calculable value causes error in sums)
|
|
86
|
+
- 42db58b6: Fixing nan and inf checks in the obejctive functions
|
|
87
|
+
- 3e830f64: fix bads value error when unpacking and compiling results from subject-level fits
|
|
88
|
+
- ea5b2750: cpm.generators.Simulator can now handle cases where trial numbers differ between participants
|
|
89
|
+
- 2ae833f3: cpm.models.learning.DeltaRule.noisy_learning_rule() should not be scaled by learning rate
|
|
90
|
+
- 2d0c716d: cpm.hierarchical.EmpiricalBayes non-writable array and np.nanmean reference bug
|
|
91
|
+
- 62f92b16: fix #33:optimiser reset fails for parameters with any non-finite bounds
|
|
92
|
+
- bfb167a8: updating params in LogParameters should only apply log transform when it is a freely varying parameter
|
|
93
|
+
- b2a8ee35: fix LogParameters copy problem
|
|
94
|
+
- 5ecada13: fix the issue where updating parameters in LogParameters would only accept non-log values
|
|
95
|
+
- 988b77a4: fix variational bayes data type error
|
|
96
|
+
- 67df33c3: fix empirical bayes assigning values to objects before creating them
|
|
97
|
+
- 62f92b16: fix initial guesses cannot generate starting guesses for parameter with non-finite or nan bounds
|
|
98
|
+
- 88d056ff: fix a bug where undeclared variables caused issue in Empirical Bayes
|
|
99
|
+
- b094aca9: fix inverted SD in the variational bayes method - remove as it is unnecessary
|