Skip to content

Commit

Permalink
ExhaustiveSearch1Ply => ExhaustiveSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
frankier committed Nov 5, 2024
1 parent 7620667 commit 44add3d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
4 changes: 2 additions & 2 deletions docs/src/creating_a_cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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`
Expand Down
10 changes: 5 additions & 5 deletions src/next_item_rules/NextItemRules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -116,7 +116,7 @@ $(TYPEDEF)
abstract type NextItemStrategy <: CatConfigBase end

function NextItemStrategy(; parallel = true)
ExhaustiveSearch1Ply(parallel)
ExhaustiveSearch(parallel)
end

function NextItemStrategy(bits...; parallel = true)
Expand All @@ -130,7 +130,7 @@ $(TYPEDEF)
$(TYPEDFIELDS)
"""
@with_kw struct ExhaustiveSearch1Ply <: NextItemStrategy
@with_kw struct ExhaustiveSearch <: NextItemStrategy
parallel::Bool = false
end

Expand All @@ -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,
Expand All @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions src/next_item_rules/aliases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand All @@ -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
Expand Down

0 comments on commit 44add3d

Please sign in to comment.