Skip to content

Commit cf02e11

Browse files
author
Frankie Robertson
committed
Additions and refactor
* Add in CatRecorder * CatLoopConfig => CatLoop * Move CatLoop into Sim
1 parent d9151d9 commit cf02e11

23 files changed

+566
-149
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
1111
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
1212
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1313
EffectSizes = "e248de7e-9197-5860-972e-353a2af44d75"
14+
ElasticArrays = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4"
1415
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
1516
FittedItemBanks = "3f797b09-34e4-41d7-acf6-3302ae3248a5"
1617
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
@@ -47,6 +48,7 @@ DataFrames = "1.6.1"
4748
Distributions = "^0.25.88"
4849
DocStringExtensions = " ^0.9"
4950
EffectSizes = "^1.0.1"
51+
ElasticArrays = "1.2.12"
5052
FillArrays = "0.13, 1.5.0"
5153
FittedItemBanks = "^0.7.2"
5254
ForwardDiff = "1"

docs/examples/examples/ability_convergence_3pl.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ xs = range(-2.5, 2.5, length = points)
5757
raw_estimator = LikelihoodAbilityEstimator()
5858
recorder = CatRecorder(xs, responses, integrator, raw_estimator, ability_estimator)
5959
for testee_idx in axes(responses, 2)
60-
tracked_responses, θ = run_cat(CatLoopConfig(rules = rules,
60+
tracked_responses, θ = run_cat(CatLoop(rules = rules,
6161
get_response = auto_responder(@view responses[:, testee_idx]),
6262
new_response_callback = (tracked_responses, terminating) -> recorder(tracked_responses,
6363
testee_idx,

docs/examples/examples/ability_convergence_mirt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ recorder = CatRecorder(xs,
6767
abilities)
6868
for testee_idx in axes(responses, 2)
6969
@debug "Running for testee" testee_idx
70-
tracked_responses, θ = run_cat(CatLoopConfig(rules = rules,
70+
tracked_responses, θ = run_cat(CatLoop(rules = rules,
7171
get_response = auto_responder(@view responses[:, testee_idx]),
7272
new_response_callback = (tracked_responses, terminating) -> recorder(tracked_responses,
7373
testee_idx,

docs/examples/examples/vocab_iq.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function run_vocab_iq_cat()
6363
println("Got ability estimate: $ability ± $var")
6464
println("")
6565
end
66-
loop_config = CatLoopConfig(rules = rules,
66+
loop_config = CatLoop(rules = rules,
6767
get_response = get_response,
6868
new_response_callback = new_response_callback)
6969
run_cat(loop_config, item_bank)

docs/src/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ CurrentModule = ComputerAdaptiveTesting
88
```
99

1010
```@autodocs
11-
Modules = [ComputerAdaptiveTesting, ComputerAdaptiveTesting.Aggregators, ComputerAdaptiveTesting.Responses, ComputerAdaptiveTesting.Sim, ComputerAdaptiveTesting.TerminationConditions, ComputerAdaptiveTesting.NextItemRules, ComputerAdaptiveTesting.CatConfig]
11+
Modules = [ComputerAdaptiveTesting, ComputerAdaptiveTesting.Aggregators, ComputerAdaptiveTesting.Responses, ComputerAdaptiveTesting.Sim, ComputerAdaptiveTesting.TerminationConditions, ComputerAdaptiveTesting.NextItemRules, ComputerAdaptiveTesting.Rules]
1212
```

docs/src/creating_a_cat.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The configuration of a CAT is built up as a tree of configuration structs.
1313
These structs are all subtypes of `CatConfigBase`.
1414

1515
```@docs; canonical=false
16-
ComputerAdaptiveTesting.CatConfig.CatConfigBase
16+
ComputerAdaptiveTesting.ConfigBase.CatConfigBase
1717
```
1818

1919
The constructors for the configuration structs in this package tend to have
@@ -59,7 +59,7 @@ next item selection rule, and the stopping rule. `CatRules` has explicit and
5959
implicit constructors.
6060

6161
```@docs; canonical=false
62-
ComputerAdaptiveTesting.CatConfig.CatRules
62+
ComputerAdaptiveTesting.CatRules
6363
```
6464

6565
### Next item selection with `NextItemRule`

docs/src/stateful.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ Stateful.StatefulCatConfig
3333

3434
## Usage
3535

36-
Just as [CatLoopConfig](@ref) can wrap [CatRules](@ref), you can also use it with any implementor of [Stateful.StatefulCat](@ref), and run using [Sim.run_cat](@ref).
36+
Just as [CatLoop](@ref) can wrap [CatRules](@ref), you can also use it with any implementor of [Stateful.StatefulCat](@ref), and run using [Sim.run_cat](@ref).

docs/src/using_your_cat.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ a number of ways you can use it.
99
This section covers a few.
1010
See also the [Examples](@ref demo-page).
1111

12-
When you've set up your CAT using [CatRules](@ref), you can wrap it in a [CatLoopConfig](@ref) and run it with [run_cat](@ref).
12+
When you've set up your CAT using [CatRules](@ref), you can wrap it in a [CatLoop](@ref) and run it with [run_cat](@ref).
1313

1414
```@docs; canonical=false
15-
CatLoopConfig
15+
CatLoop
1616
run_cat
1717
```
1818

src/Compat/CatR.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using ComputerAdaptiveTesting.Aggregators: AbilityIntegrator,
77
MeanAbilityEstimator,
88
PriorAbilityEstimator
99
using ComputerAdaptiveTesting.TerminationConditions: RunForeverTerminationCondition
10-
using ComputerAdaptiveTesting.CatConfig: CatRules
10+
using ComputerAdaptiveTesting.Rules: CatRules
1111
using ComputerAdaptiveTesting.NextItemRules
1212
using PsychometricsBazaarBase: Integrators, Optimizers
1313

src/Compat/MirtCAT.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ using ComputerAdaptiveTesting.Aggregators: SafeLikelihoodAbilityEstimator,
99
AbilityEstimator,
1010
distribution_estimator
1111
using ComputerAdaptiveTesting.TerminationConditions: RunForeverTerminationCondition
12-
using ComputerAdaptiveTesting.CatConfig: CatRules
1312
using ComputerAdaptiveTesting.NextItemRules
13+
using ComputerAdaptiveTesting: CatRules
1414
using PsychometricsBazaarBase: Integrators, Optimizers
1515

1616
public next_item_aliases, ability_estimator_aliases, assemble_rules

0 commit comments

Comments
 (0)