Skip to content

Information compat #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a419d90
Update gitignore
frankier Apr 20, 2025
920cd88
item_response_function => item_response_functions
frankier Apr 20, 2025
c3f4eb8
Add sequential next item strategies
frankier May 29, 2025
f7d3b74
Adjust test_stateful_cat_item_bank_1d_dich_ib to test whole vec
frankier May 29, 2025
e04a19f
Update compats
frankier May 29, 2025
dac0c6b
Add watchdog, likelihood sampling, callback skipping to comparison
frankier May 29, 2025
4526bba
Add compat layer
frankier May 29, 2025
b8046ec
Add likelihood to Stateful
frankier May 29, 2025
19c0db0
Add SafeLikelihoodEstimator
frankier May 29, 2025
1a6b7d2
Various changes
frankier May 29, 2025
cc964ef
Fix up comparison module directory
frankier Jun 1, 2025
9055986
Remove dependency upon ResumableFunctions
frankier Jun 8, 2025
8992a35
Fix some typos in MirtCAT compat
frankier Jun 8, 2025
f3d9a6b
Add multidim to MirtCAT compat
frankier Jun 8, 2025
b8675b9
Add RandomesqueStrategy
frankier Jun 8, 2025
8b035bf
Make mirtcat compat tests be based on normal item bank
frankier Jun 8, 2025
d82fb65
Reduce default margin in test_stateful_cat_item_bank_1d_dich_ib
frankier Jun 8, 2025
86a3951
Add test_ability to TestExt
frankier Jun 8, 2025
e48dd80
Move sim to own directory
frankier Jun 8, 2025
8aab64f
Fix multidim expected_item_information
frankier Jun 8, 2025
98c3b06
Use expected_item_information for previous items in multidim case (mi…
frankier Jun 8, 2025
18d0488
Fix dispatch for criteria
frankier Jun 8, 2025
869d699
Fix up and modularise tests
frankier Jun 8, 2025
55525c8
Bump PsychometricsBazaarBase req to 0.8.4
frankier Jun 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
*.jl.cov
*.jl.mem
Manifest.toml
!/docs/Manifest.toml
!/test/Manifest.toml
!/binder/Manifest.toml
/attic/
attic/
/.vscode/
/docs/attic/
/docs/build/
/docs/.CondaPkg/
/docs/LocalPreferences.toml
Expand Down
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
PsychometricsBazaarBase = "b0d9cada-d963-45e9-a4c6-4746243987f1"
QuickHeaps = "30b38841-0f52-47f8-a5f8-18d5d4064379"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Expand All @@ -47,7 +48,7 @@ Distributions = "^0.25.88"
DocStringExtensions = " ^0.9"
EffectSizes = "^1.0.1"
FillArrays = "0.13, 1.5.0"
FittedItemBanks = "^0.6.3"
FittedItemBanks = "^0.6.3, ^0.7.0"
ForwardDiff = "1"
HypothesisTests = "^0.10.12, ^0.11.0"
Interpolations = "^0.14, ^0.15"
Expand All @@ -59,10 +60,10 @@ MacroTools = "^0.5.6"
Mmap = "^1.11"
Optim = "1.7.3"
PrecompileTools = "1.2.1"
PsychometricsBazaarBase = "^0.8.1"
PsychometricsBazaarBase = "^0.8.4"
QuickHeaps = "0.2.2"
Random = "^1.11"
Reexport = "1"
ResumableFunctions = "^0.6"
Setfield = "^1"
SparseArrays = "^1.11"
StaticArrays = "1"
Expand All @@ -75,8 +76,7 @@ julia = "^1.11"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
ResumableFunctions = "c5292f4c-5179-55e1-98c5-05642aab7184"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "JET", "Optim", "ResumableFunctions", "Test"]
test = ["Aqua", "JET", "Optim", "Test"]
28 changes: 24 additions & 4 deletions ext/TestExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module TestExt

using Test
using ComputerAdaptiveTesting: Stateful
using FittedItemBanks: AbstractItemBank, ItemResponse, resp
using FittedItemBanks: AbstractItemBank, ItemResponse, resp_vec

export test_stateful_cat_1d_dich_ib, test_stateful_cat_item_bank_1d_dich_ib

Expand Down Expand Up @@ -96,18 +96,38 @@ function test_stateful_cat_item_bank_1d_dich_ib(
cat::Stateful.StatefulCat,
item_bank::AbstractItemBank,
points=[-.78, 0.0, .78],
margin=0.05,
margin=0.01,
)
if length(item_bank) != Stateful.item_bank_size(cat)
error("Item bank length does not match the cat's item bank size.")
end
for i in 1:length(item_bank)
for point in points
cat_prob = Stateful.item_response_function(cat, i, true, point)
ib_prob = resp(ItemResponse(item_bank, i), true, point)
cat_prob = Stateful.item_response_functions(cat, i, point)
ib_prob = resp_vec(ItemResponse(item_bank, i), point)
@test cat_prob ≈ ib_prob rtol=margin
end
end
end

function test_ability(
cat1::Stateful.StatefulCat,
cat2::Stateful.StatefulCat,
item_bank_length;
margin=0.01
)
if item_bank_length < 4
error("Item bank length must be at least 4.")
end
for cat in (cat1, cat2)
Stateful.add_response!(cat, 1, false)
Stateful.add_response!(cat, 2, true)
Stateful.add_response!(cat, 3, false)
Stateful.add_response!(cat, 4, true)
end
ability1 = Stateful.get_ability(cat1)
ability2 = Stateful.get_ability(cat2)
@test ability1[1] ≈ ability2[1] rtol=margin
end

end
Loading
Loading