adaptivetesting 1.1.5__tar.gz → 1.1.6__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.
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.github/workflows/python-test.yml +2 -2
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/CHANGELOG.md +4 -1
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/PKG-INFO +2 -2
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__bayes_modal_estimation.py +3 -2
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__functions/__bayes.py +32 -12
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/pyproject.toml +2 -2
- adaptivetesting-1.1.6/uv.lock +4713 -0
- adaptivetesting-1.1.5/uv.lock +0 -4274
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.github/CONTRIBUTING.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.github/workflows/publish.yml +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.gitignore +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.gitlab-ci.yml +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.python-version +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.readthedocs.yml +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.vscode/extensions.json +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/.vscode/settings.json +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/LICENSE +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/README.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/data/__csv_context.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/data/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/data/__pickle_context.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/implementations/__default_implementation.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/implementations/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/implementations/__pre_test.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/implementations/__semi_implementation.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/implementations/__test_assembler.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/__gen_response_pattern.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__expect_a_posteriori.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__functions/__estimators.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__ml_estimation.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__prior.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/estimators/__test_information.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/item_selection/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/item_selection/__maximum_information_criterion.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/math/item_selection/__urrys_rule.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__adaptive_test.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__algorithm_exception.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__item_pool.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__item_selection_exception.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__misc.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__test_item.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/models/__test_result.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/services/__estimator_interface.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/services/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/services/__item_selection_protocol.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/services/__test_results_interface.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/simulation/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/simulation/__simulation.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_adaptive_test.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_bayes_modal.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_descriptives.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_eap.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_generate_response_pattern.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_information_test.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_item_selection.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_load_test_items.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_mle.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_plots.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_pretest.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_simulation.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_standard_error.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/tests/test_test_assembler.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/utils/__descriptives.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/utils/__funcs.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/utils/__init__.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/adaptivetesting/utils/__plots.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/Makefile +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/data.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/implementations.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/index.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/make.bat +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/math.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/models.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/readme.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/requirements.txt +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/services.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/simulation.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/_static/SPEC-0.svg +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/_static/logo.svg +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/_static/main.css +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/conf.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/data.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/implementations.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/index.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/math.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/models.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/services.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/simulation.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/source/tests.rst +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/docs/tests.md +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/examples/.gitignore +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/examples/simulation.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/examples/testing.py +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/images/default.svg +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/images/semi-adaptive.svg +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/mypy.ini +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/requirements.txt +0 -0
- {adaptivetesting-1.1.5 → adaptivetesting-1.1.6}/setup.cfg +0 -0
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
strategy:
|
|
17
17
|
fail-fast: false
|
|
18
18
|
matrix:
|
|
19
|
-
python-version: ["3.
|
|
19
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
22
|
- uses: actions/checkout@v3
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
strategy:
|
|
43
43
|
fail-fast: false
|
|
44
44
|
matrix:
|
|
45
|
-
python-version: ["3.
|
|
45
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
46
46
|
|
|
47
47
|
steps:
|
|
48
48
|
- uses: actions/checkout@v3
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Version 1.1.6
|
|
2
|
+
- Bug Fig #49 (optimization interval issue in BayesModal)
|
|
3
|
+
|
|
1
4
|
# Version 1.1.5
|
|
2
5
|
- Bug Fix #46 (numerical stability issue concerning Bayesian ability estimation)
|
|
3
6
|
|
|
@@ -10,4 +13,4 @@
|
|
|
10
13
|
# Version 1.1.2
|
|
11
14
|
|
|
12
15
|
- The `ItemPool` class now correctly honors the `id` field of items. (#30, #31)
|
|
13
|
-
- Examples and the readme file have been updated accordingly.
|
|
16
|
+
- Examples and the readme file have been updated accordingly.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adaptivetesting
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.6
|
|
4
4
|
Summary: adaptivetesting is a Python package that can be used to simulate and evaluate custom CAT scenarios as well as implement them in real-world testing scenarios from a single codebase
|
|
5
5
|
Project-URL: Homepage, https://github.com/condecon/adaptivetesting
|
|
6
6
|
Project-URL: Documentation, https://github.com/condecon/adaptivetesting/tree/main/docs
|
|
@@ -12,7 +12,7 @@ Keywords: computerized-adaptive-testing,item-response-theory,psychology,statisti
|
|
|
12
12
|
Requires-Python: >=3.12
|
|
13
13
|
Requires-Dist: matplotlib>=3.9.0
|
|
14
14
|
Requires-Dist: numpy>=2.0.0
|
|
15
|
-
Requires-Dist: pandas>=2.
|
|
15
|
+
Requires-Dist: pandas>=2.3.0
|
|
16
16
|
Requires-Dist: scipy>=1.12.0
|
|
17
17
|
Requires-Dist: tqdm>=4.66.0
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
@@ -62,7 +62,8 @@ class BayesModal(IEstimator):
|
|
|
62
62
|
self.c,
|
|
63
63
|
self.d,
|
|
64
64
|
self.response_pattern,
|
|
65
|
-
self.prior
|
|
65
|
+
self.prior,
|
|
66
|
+
self.optimization_interval
|
|
66
67
|
)
|
|
67
68
|
# else, we have to calculate the full posterior distribution
|
|
68
69
|
# because the optimizers do not correctly identify the maximum of the function
|
|
@@ -91,7 +92,7 @@ class BayesModal(IEstimator):
|
|
|
91
92
|
])
|
|
92
93
|
|
|
93
94
|
# add prior
|
|
94
|
-
unmarginalized_posterior = lik_values * self.prior.pdf(mu)
|
|
95
|
+
unmarginalized_posterior = lik_values * np.log(self.prior.pdf(mu))
|
|
95
96
|
# find argmin and return mu
|
|
96
97
|
estimate_index = np.argmin(unmarginalized_posterior)
|
|
97
98
|
return float(mu[estimate_index].astype(float))
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
from scipy.optimize import minimize_scalar, OptimizeResult # type: ignore
|
|
3
|
-
from .__estimators import likelihood
|
|
4
3
|
from ..__prior import Prior
|
|
5
4
|
from ....models.__algorithm_exception import AlgorithmException
|
|
6
5
|
from .__estimators import probability_y0, probability_y1
|
|
@@ -19,15 +18,15 @@ def maximize_posterior(
|
|
|
19
18
|
|
|
20
19
|
Args:
|
|
21
20
|
a (np.ndarray): item parameter a
|
|
22
|
-
|
|
21
|
+
|
|
23
22
|
b (np.ndarray): item parameter b
|
|
24
|
-
|
|
23
|
+
|
|
25
24
|
c (np.ndarray): item parameter c
|
|
26
|
-
|
|
25
|
+
|
|
27
26
|
d (np.ndarray): item parameter d
|
|
28
|
-
|
|
27
|
+
|
|
29
28
|
response_pattern (np.ndarray): response pattern (simulated or user generated)
|
|
30
|
-
|
|
29
|
+
|
|
31
30
|
prior (Prior): prior distribution
|
|
32
31
|
|
|
33
32
|
optimization_interval (Tuple[float, float]): interval used for the optimization function
|
|
@@ -39,18 +38,39 @@ def maximize_posterior(
|
|
|
39
38
|
p1 = probability_y1(mu, a, b, c, d)
|
|
40
39
|
p0 = probability_y0(mu, a, b, c, d)
|
|
41
40
|
|
|
42
|
-
log_likelihood = np.sum(
|
|
43
|
-
|
|
41
|
+
log_likelihood = np.sum(
|
|
42
|
+
(response_pattern * np.log(p1 + 1e-300)) + (
|
|
43
|
+
(1 - response_pattern) * np.log(p0 + 1e-300)
|
|
44
|
+
))
|
|
44
45
|
log_prior = np.log(prior.pdf(mu) + 1e-300)
|
|
45
|
-
|
|
46
|
+
|
|
46
47
|
return log_likelihood + log_prior
|
|
47
|
-
|
|
48
|
+
|
|
48
49
|
result: OptimizeResult = minimize_scalar(lambda mu: -log_posterior(mu),
|
|
49
50
|
bounds=optimization_interval,
|
|
50
51
|
method="bounded") # type: ignore
|
|
51
|
-
|
|
52
|
+
|
|
52
53
|
if not result.success:
|
|
53
54
|
raise AlgorithmException(f"Optimization failed: {result.message}")
|
|
54
|
-
|
|
55
|
+
|
|
55
56
|
else:
|
|
56
57
|
return float(result.x)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def likelihood(mu: np.ndarray,
|
|
61
|
+
a: np.ndarray,
|
|
62
|
+
b: np.ndarray,
|
|
63
|
+
c: np.ndarray,
|
|
64
|
+
d: np.ndarray,
|
|
65
|
+
response_pattern: np.ndarray
|
|
66
|
+
):
|
|
67
|
+
|
|
68
|
+
p1 = probability_y1(mu, a, b, c, d)
|
|
69
|
+
p0 = probability_y0(mu, a, b, c, d)
|
|
70
|
+
|
|
71
|
+
log_likelihood = np.sum(
|
|
72
|
+
(response_pattern * np.log(p1 + 1e-300)) + (
|
|
73
|
+
(1 - response_pattern) * np.log(p0 + 1e-300)
|
|
74
|
+
))
|
|
75
|
+
|
|
76
|
+
return -np.exp(log_likelihood)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name="adaptivetesting"
|
|
3
|
-
version="1.1.
|
|
3
|
+
version="1.1.6"
|
|
4
4
|
description="adaptivetesting is a Python package that can be used to simulate and evaluate custom CAT scenarios as well as implement them in real-world testing scenarios from a single codebase"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -9,7 +9,7 @@ authors = [
|
|
|
9
9
|
requires-python = ">=3.12"
|
|
10
10
|
dependencies = [
|
|
11
11
|
"numpy>=2.0.0",
|
|
12
|
-
"pandas>=2.
|
|
12
|
+
"pandas>=2.3.0",
|
|
13
13
|
"scipy>=1.12.0",
|
|
14
14
|
"tqdm>=4.66.0",
|
|
15
15
|
"matplotlib>=3.9.0"
|