diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 5e1fea1..a1c8597 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -39,7 +39,7 @@ function prepare_4pls(group) for (est_nick, ability_estimator) in ability_estimators next_item_rule = ItemStrategyNextItemRule( - ExhaustiveSearch1Ply(), + ExhaustiveSearch(), ExpectationBasedItemCriterion(PointResponseExpectation(ability_estimator), AbilityVarianceStateCriterion( integrator, distribution_estimator(ability_estimator))) diff --git a/docs/src/creating_a_cat.md b/docs/src/creating_a_cat.md index 3ad7ea2..8b2664b 100644 --- a/docs/src/creating_a_cat.md +++ b/docs/src/creating_a_cat.md @@ -80,7 +80,7 @@ ComputerAdaptiveTesting.NextItemRules.RandomNextItemRule Other rules are created by combining a `ItemCriterion` -- which somehow rates items according to how good they are -- with a `NextItemStrategy` using an `ItemStrategyNextItemRule`, which acts as an adapter. The default -`NextItemStrategy` (and currently only) is `ExhaustiveSearch1Ply`. When using +`NextItemStrategy` (and currently only) is `ExhaustiveSearch`. When using the implicit constructors, `ItemCriterion` can therefore be used directly without wrapping in any place an NextItemRule is expected. @@ -97,7 +97,7 @@ ComputerAdaptiveTesting.NextItemRules.NextItemStrategy ``` ```@docs; canonical=false -ComputerAdaptiveTesting.NextItemRules.ExhaustiveSearch1Ply +ComputerAdaptiveTesting.NextItemRules.ExhaustiveSearch ``` ### Evaluating item and state merit with `ItemCriterion` and `StateCriterion` diff --git a/src/next_item_rules/NextItemRules.jl b/src/next_item_rules/NextItemRules.jl index 30f2f86..b83d119 100644 --- a/src/next_item_rules/NextItemRules.jl +++ b/src/next_item_rules/NextItemRules.jl @@ -36,7 +36,7 @@ export ExpectationBasedItemCriterion, AbilityVarianceStateCriterion, init_thread export NextItemRule, ItemStrategyNextItemRule export UrryItemCriterion, InformationItemCriterion export RandomNextItemRule -export ExhaustiveSearch1Ply +export ExhaustiveSearch export catr_next_item_aliases export preallocate export compute_criteria @@ -116,7 +116,7 @@ $(TYPEDEF) abstract type NextItemStrategy <: CatConfigBase end function NextItemStrategy(; parallel = true) - ExhaustiveSearch1Ply(parallel) + ExhaustiveSearch(parallel) end function NextItemStrategy(bits...; parallel = true) @@ -130,7 +130,7 @@ $(TYPEDEF) $(TYPEDFIELDS) """ -@with_kw struct ExhaustiveSearch1Ply <: NextItemStrategy +@with_kw struct ExhaustiveSearch <: NextItemStrategy parallel::Bool = false end @@ -144,7 +144,7 @@ adapter by which an `ItemCriterion` can serve as a `NextItemRule`. $(FUNCTIONNAME)(bits...; ability_estimator=nothing, parallel=true) Implicit constructor for $(FUNCTIONNAME). Will default to -`ExhaustiveSearch1Ply` when no `NextItemStrategy` is given. +`ExhaustiveSearch` when no `NextItemStrategy` is given. """ struct ItemStrategyNextItemRule{ NextItemStrategyT <: NextItemStrategy, @@ -167,7 +167,7 @@ function ItemStrategyNextItemRule(bits...; end end -function (rule::ItemStrategyNextItemRule{ExhaustiveSearch1Ply, ItemCriterionT})(responses, +function (rule::ItemStrategyNextItemRule{ExhaustiveSearch, ItemCriterionT})(responses, items) where {ItemCriterionT <: ItemCriterion} #, rule.strategy.parallel choose_item_1ply(rule.criterion, responses, items)[1] diff --git a/src/next_item_rules/aliases.jl b/src/next_item_rules/aliases.jl index fdf80a2..b67ef63 100644 --- a/src/next_item_rules/aliases.jl +++ b/src/next_item_rules/aliases.jl @@ -4,13 +4,13 @@ available through in the `catR` R package. TODO compability with `mirtcat` """ const catr_next_item_aliases = Dict( "MFI" => (ability_estimator; parallel = true) -> ItemStrategyNextItemRule( - ExhaustiveSearch1Ply(parallel), + ExhaustiveSearch(parallel), InformationItemCriterion(ability_estimator)), "bOpt" => (ability_estimator; parallel = true) -> ItemStrategyNextItemRule( - ExhaustiveSearch1Ply(parallel), + ExhaustiveSearch(parallel), UrryItemCriterion(ability_estimator)), "MEPV" => (ability_estimator; parallel = true) -> ItemStrategyNextItemRule( - ExhaustiveSearch1Ply(parallel), + ExhaustiveSearch(parallel), ExpectationBasedItemCriterion(ability_estimator, AbilityVarianceStateCriterion(ability_estimator))) #"MLWI", #"MPWI", #"MEI", ) @@ -29,7 +29,7 @@ function _mirtcat_helper(item_criterion_callback) ability_estimator = AbilityEstimator(bits...; ability_estimator = ability_estimator) item_criterion = item_criterion_callback( [bits..., ability_estimator], ability_estimator) - return ItemStrategyNextItemRule(ExhaustiveSearch1Ply(), item_criterion) + return ItemStrategyNextItemRule(ExhaustiveSearch(), item_criterion) end return _helper end