API reference
ComputerAdaptiveTesting.AggregatorsComputerAdaptiveTesting.NextItemRulesComputerAdaptiveTesting.ResponsesComputerAdaptiveTesting.SimComputerAdaptiveTesting.StatefulComputerAdaptiveTesting.Aggregators.LikelihoodAbilityEstimatorComputerAdaptiveTesting.Aggregators.MeanAbilityEstimatorComputerAdaptiveTesting.Aggregators.ModeAbilityEstimatorComputerAdaptiveTesting.Aggregators.PosteriorAbilityEstimatorComputerAdaptiveTesting.Aggregators.RiemannEnumerationIntegratorComputerAdaptiveTesting.Aggregators.TrackedResponsesComputerAdaptiveTesting.Comparison.CatComparisonConfigComputerAdaptiveTesting.ConfigBase.CatConfigBaseComputerAdaptiveTesting.ItemBanks.DichotomousPointsWithLogsItemBankComputerAdaptiveTesting.ItemBanks.LogItemBankComputerAdaptiveTesting.NextItemRules.AbilityVarianceComputerAdaptiveTesting.NextItemRules.CriterionBaseComputerAdaptiveTesting.NextItemRules.EmpiricalInformationPointwiseItemCategoryCriterionComputerAdaptiveTesting.NextItemRules.ExhaustiveSearchComputerAdaptiveTesting.NextItemRules.ExpectationBasedItemCriterionComputerAdaptiveTesting.NextItemRules.FixedRuleSequencerComputerAdaptiveTesting.NextItemRules.GreedyForcedContentBalancerComputerAdaptiveTesting.NextItemRules.ItemCategoryCriterionComputerAdaptiveTesting.NextItemRules.ItemCriterionComputerAdaptiveTesting.NextItemRules.ItemCriterionRuleComputerAdaptiveTesting.NextItemRules.MemoryNextItemRuleComputerAdaptiveTesting.NextItemRules.NextItemRuleComputerAdaptiveTesting.NextItemRules.NextItemStrategyComputerAdaptiveTesting.NextItemRules.ObservedInformationPointwiseItemCategoryCriterionComputerAdaptiveTesting.NextItemRules.PointResponseExpectationComputerAdaptiveTesting.NextItemRules.PointwiseItemCategoryCriterionComputerAdaptiveTesting.NextItemRules.PointwiseItemCriterionComputerAdaptiveTesting.NextItemRules.RandomNextItemRuleComputerAdaptiveTesting.NextItemRules.RandomesqueStrategyComputerAdaptiveTesting.NextItemRules.RawEmpiricalInformationPointwiseItemCategoryCriterionComputerAdaptiveTesting.NextItemRules.StateCriterionComputerAdaptiveTesting.NextItemRules.UrryItemCriterionComputerAdaptiveTesting.Responses.AbilityLikelihoodComputerAdaptiveTesting.Responses.BareResponsesComputerAdaptiveTesting.Responses.ResponseComputerAdaptiveTesting.Rules.CatRulesComputerAdaptiveTesting.Sim.CatLoopComputerAdaptiveTesting.Sim.RecordedCatLoopComputerAdaptiveTesting.Stateful.StatefulCatComputerAdaptiveTesting.Stateful.StatefulCatRulesComputerAdaptiveTesting.TerminationConditions.FixedLengthComputerAdaptiveTesting.TerminationConditions.TerminationConditionComputerAdaptiveTesting.Aggregators.maybe_tracked_ability_estimateComputerAdaptiveTesting.Comparison.run_random_comparisonComputerAdaptiveTesting.Responses.add_response!ComputerAdaptiveTesting.Responses.function_xsComputerAdaptiveTesting.Responses.function_ysComputerAdaptiveTesting.Responses.pop_response!ComputerAdaptiveTesting.Sim.auto_responderComputerAdaptiveTesting.Sim.consume!ComputerAdaptiveTesting.Sim.prompt_responseComputerAdaptiveTesting.Sim.record!ComputerAdaptiveTesting.Sim.run_catComputerAdaptiveTesting.Sim.run_catComputerAdaptiveTesting.Sim.run_catComputerAdaptiveTesting.Stateful.add_response!ComputerAdaptiveTesting.Stateful.get_abilityComputerAdaptiveTesting.Stateful.get_responsesComputerAdaptiveTesting.Stateful.item_bank_sizeComputerAdaptiveTesting.Stateful.item_criteriaComputerAdaptiveTesting.Stateful.item_response_functionsComputerAdaptiveTesting.Stateful.likelihoodComputerAdaptiveTesting.Stateful.next_itemComputerAdaptiveTesting.Stateful.ranked_itemsComputerAdaptiveTesting.Stateful.reset!ComputerAdaptiveTesting.Stateful.rollback!ComputerAdaptiveTesting.Stateful.set_item_bank!
ComputerAdaptiveTesting.Aggregators — Module
This module takes care of integrating and optimizing over the ability/difficulty space. It includes TrackedResponses, which can store cumulative results during a test.
ComputerAdaptiveTesting.Aggregators.LikelihoodAbilityEstimator — Type
struct LikelihoodAbilityEstimator <: ComputerAdaptiveTesting.Aggregators.DistributionAbilityEstimatorThe ability likelihood distribution.
LikelihoodAbilityEstimator()ComputerAdaptiveTesting.Aggregators.MeanAbilityEstimator — Type
struct MeanAbilityEstimator{DistEst<:ComputerAdaptiveTesting.Aggregators.DistributionAbilityEstimator, IntegratorT<:ComputerAdaptiveTesting.Aggregators.AbilityIntegrator} <: ComputerAdaptiveTesting.Aggregators.PointAbilityEstimatorPoint ability estimate given by the mean (EAP) of dist_est, computed using integrator.
MeanAbilityEstimator(bits...)Bag-of-config-bits constructor: uses any given DistributionAbilityEstimator and AbilityIntegrator found in bits, or builds default ones from the rest of bits.
ComputerAdaptiveTesting.Aggregators.ModeAbilityEstimator — Type
struct ModeAbilityEstimator{DistEst<:ComputerAdaptiveTesting.Aggregators.DistributionAbilityEstimator, OptimizerT<:ComputerAdaptiveTesting.Aggregators.AbilityOptimizer} <: ComputerAdaptiveTesting.Aggregators.PointAbilityEstimatorPoint ability estimate given by the mode of dist_est (e.g. MLE for a LikelihoodAbilityEstimator or MAP for a PosteriorAbilityEstimator), found using optim.
ModeAbilityEstimator(bits...)Bag-of-config-bits constructor: uses any given DistributionAbilityEstimator and AbilityOptimizer found in bits, or builds default ones from the rest of bits.
ComputerAdaptiveTesting.Aggregators.PosteriorAbilityEstimator — Type
struct PosteriorAbilityEstimator{PriorT<:Distributions.Distribution} <: ComputerAdaptiveTesting.Aggregators.DistributionAbilityEstimatorAbility posterior distribution: the response likelihood times a prior distribution over ability (a standard normal by default).
PosteriorAbilityEstimator(; ncomp=0)Constructs with a standard normal prior (ncomp=0) or a ncomp-dimensional standard multivariate normal prior.
ComputerAdaptiveTesting.Aggregators.RiemannEnumerationIntegrator — Type
In case an item bank is enumerable (e.g. GriddedItemBank), then this method integrates over the ability likihood given a set of responses with a given coefficient function using a Riemann sum (aka the rectangle rule).
ComputerAdaptiveTesting.Aggregators.TrackedResponses — Type
struct TrackedResponses{BareResponsesT<:ComputerAdaptiveTesting.Responses.BareResponses, ItemBankT<:FittedItemBanks.AbstractItemBank, AbilityTrackerT<:ComputerAdaptiveTesting.Aggregators.AbilityTracker}Responses to items in item_bank (as BareResponses), together with an ability_tracker that maintains an incrementally-updated ability estimate (or distribution) as responses are added. This is the object threaded through a CAT run and passed to next item rules, termination conditions and ability estimators.
ComputerAdaptiveTesting.Aggregators.maybe_tracked_ability_estimate — Method
This method returns a tracked point estimate if it is has the given ability estimator, otherwise it computes it using the given ability estimator.
ComputerAdaptiveTesting.Responses — Module
Types and functions for recording examinee responses and evaluating the resulting ability likelihood function.
ComputerAdaptiveTesting.Responses.AbilityLikelihood — Type
struct AbilityLikelihood{ItemBankT<:FittedItemBanks.AbstractItemBank, BareResponsesT<:ComputerAdaptiveTesting.Responses.BareResponses}The likelihood of ability θ given responses to items in item_bank, i.e. θ -> prod(P(response | θ) for response in responses). Callable as a function of θ; also has function_xs/function_ys methods for item banks that support evaluation at a fixed grid of xs.
ComputerAdaptiveTesting.Responses.BareResponses — Type
struct BareResponses{ResponseTypeT<:FittedItemBanks.ResponseType, ConcreteResponseTypeT, IndicesVecT<:AbstractVector{Int64}, ValuesVecT<:AbstractArray{ConcreteResponseTypeT, 1}}A bare (untracked) sequence of responses, stored as parallel vectors of item indices and response values, sharing a common rt (response type). See also TrackedResponses, which additionally tracks the item bank and ability estimate.
ComputerAdaptiveTesting.Responses.Response — Type
struct Response{ResponseTypeT<:FittedItemBanks.ResponseType, ConcreteResponseTypeT}A single response of the given ResponseType to the item at index.
ComputerAdaptiveTesting.Responses.add_response! — Method
add_response!(
responses::ComputerAdaptiveTesting.Responses.BareResponses,
response::ComputerAdaptiveTesting.Responses.Response
) -> ComputerAdaptiveTesting.Responses.BareResponses
Append response to responses in-place.
ComputerAdaptiveTesting.Responses.function_xs — Method
function_xs(
ability_lh::ComputerAdaptiveTesting.Responses.AbilityLikelihood{FittedItemBanks.DichotomousPointsItemBank}
) -> Any
The grid of ability values (xs) at which ability_lh's item bank tabulates response probabilities.
ComputerAdaptiveTesting.Responses.function_ys — Method
function_ys(
ability_lh::ComputerAdaptiveTesting.Responses.AbilityLikelihood{FittedItemBanks.DichotomousPointsItemBank}
) -> Any
The likelihood of ability_lh's responses evaluated at each point in function_xs, i.e. the product over responses of the tabulated response probability at each grid point.
ComputerAdaptiveTesting.Responses.pop_response! — Method
pop_response!(
responses::ComputerAdaptiveTesting.Responses.BareResponses
) -> ComputerAdaptiveTesting.Responses.BareResponses
Remove and discard the last response from responses in-place.
ComputerAdaptiveTesting.Sim — Module
Runs a configured CAT (CatRules) in a loop (CatLoop/run_cat), obtaining responses interactively or from simulated data, and optionally recording the run (see recorder.jl).
ComputerAdaptiveTesting.Sim.CatLoop — Type
struct CatLoop
CatLoop(; rules=..., get_response=..., new_response_callback=...)rules::Any: An object which implements the CAT engine. Implementations exist for:
get_response::Any: The function(index, label) -> Int8` which obtains the testee's response for a given question, e.g. by prompting or simulation from data.
new_response_callback::Any: A callback called each time there is a new responses. If provided, it is passed(responses::TrackedResponses, terminating).
init_callback::Any: A callback called each time a CAT is run If provided, it is passed(loop::CatLoop, responses::TrackedResponses).
Configuration for a simulatable CAT.
ComputerAdaptiveTesting.Sim.RecordedCatLoop — Method
RecordedCatLoop(;
rules::CatRules,
item_bank::AbstractItemBank = nothing,
responses::Union{Nothing, Vector{ResponseType}} = nothing,
dims::Union{Nothing, Tuple{Int, Int}} = nothing,
expected_responses::Int = 0,
get_response::Function = nothing,
new_response_callback::Function = nothing,
new_response_callbacks::Vector{Function} = Any[]
requests...
)This RecordedCatLoop is a simplified construction of a [CatRules](@ref)-based [CatLoop](@ref) and [CatRecorder](@ref).
It can be constructed with just some cat rules, an item_bank, and a response memory responses, as well as usually one or more requests for the [CatRecorder](@ref). In this casedimsare provided by theitembank, andexpectedresponsesis set to the length ofresponsesas well as used to provide responses usinggetresponses, otherwise the respective arguments must be provided. The argumentsgetresponse,newresponsecallback, andnewresponsecallbacksare passed to the underlyingCatLoop`.
The resulting RecordedCatLoop can be run directly with run_cat.
ComputerAdaptiveTesting.Sim.auto_responder — Method
auto_responder(
responses
) -> ComputerAdaptiveTesting.Sim.var"#auto_responder##0#auto_responder##1"
This function constructs a next item function which automatically responds according to responses.
ComputerAdaptiveTesting.Sim.consume! — Method
consume!(dict, key) do value
...
endExecute the callback with the value at key in dict if it exists, and remove that key from the dictionary.
ComputerAdaptiveTesting.Sim.prompt_response — Method
prompt_response(index_, label) -> Int8
This response callback simply prompts the user for the response using the console
ComputerAdaptiveTesting.Sim.record! — Method
record!(
recorder::CatRecorder,
tracked_responses
) -> Union{Bool, Vector{Bool}}
ComputerAdaptiveTesting.Sim.run_cat — Method
run_cat(
loop::ComputerAdaptiveTesting.Sim.RecordedCatLoop,
item_bank::FittedItemBanks.AbstractItemBank;
ib_labels
) -> Tuple{Union{ComputerAdaptiveTesting.Responses.BareResponses{FittedItemBanks.BooleanResponse, Bool, Vector{Int64}, Vector{Bool}}, ComputerAdaptiveTesting.Responses.BareResponses{FittedItemBanks.MultinomialResponse, Int64, Vector{Int64}, Vector{Int64}}}, Any}
Run a given RecordedCatLoop by delegating the call to the wrapped CatLoop.
In case item_bank is not provided, the item bank provided during the construction of RecordedCatLoop is used.
ComputerAdaptiveTesting.Sim.run_cat — Method
run_cat(cat_config::CatLoop, item_bank::AbstractItemBank; ib_labels=nothing)Run a given CatLoop cat_config on the given item_bank. If ib_labels is not given, default labels of the form <<item #$index>> are passed to the callback.
ComputerAdaptiveTesting.TerminationConditions.FixedLength — Type
struct FixedLength <: ComputerAdaptiveTesting.TerminationConditions.TerminationConditionnum_items::Int64
ComputerAdaptiveTesting.TerminationConditions.TerminationCondition — Type
abstract type TerminationCondition <: ComputerAdaptiveTesting.ConfigBase.CatConfigBaseComputerAdaptiveTesting.NextItemRules — Module
This module implements the next item selection rules, which form the main part of CAT.
Bibliography
[1] Linden, W. J., & Pashley, P. J. (2009). Item selection and ability estimation in adaptive testing. In Elements of adaptive testing (pp. 3-30). Springer, New York, NY.
ComputerAdaptiveTesting.NextItemRules.AbilityVariance — Type
struct AbilityVariance{DistEst<:ComputerAdaptiveTesting.Aggregators.DistributionAbilityEstimator, IntegratorT<:ComputerAdaptiveTesting.Aggregators.AbilityIntegrator} <: ComputerAdaptiveTesting.NextItemRules.StateCriteriondist_est::ComputerAdaptiveTesting.Aggregators.DistributionAbilityEstimatorintegrator::ComputerAdaptiveTesting.Aggregators.AbilityIntegratorskip_zero::Bool
This StateCriterion returns the variance of the ability estimate given a set of responses.
ComputerAdaptiveTesting.NextItemRules.CriterionBase — Type
abstract type CriterionBase <: ComputerAdaptiveTesting.ConfigBase.CatConfigBaseAbstract base type all criteria should inherit from
ComputerAdaptiveTesting.NextItemRules.EmpiricalInformationPointwiseItemCategoryCriterion — Type
In equation 10 of [1] we see that we can compute information using 2nd derivatives of log likelihood or 1st derivative squared. For single categories, we need to an extra term which disappears when we calculate the total see [2]. For this reason RawEmpiricalInformationPointwiseItemCategoryCriterion computes without this factor, while EmpiricalInformationPointwiseItemCategoryCriterion computes with it.
So in general, only use the former with TotalItemInformation
[1] ``Information Functions of the Generalized Partial Credit Model'' Eiji Muraki https://doi.org/10.1177/014662169301700403
[2] https://mark.reid.name/blog/fisher-information-and-log-likelihood.html
ComputerAdaptiveTesting.NextItemRules.ExhaustiveSearch — Type
struct ExhaustiveSearch <: ComputerAdaptiveTesting.NextItemRules.NextItemStrategyComputerAdaptiveTesting.NextItemRules.ExpectationBasedItemCriterion — Type
struct ExpectationBasedItemCriterion{ResponseExpectationT<:ComputerAdaptiveTesting.NextItemRules.ResponseExpectation, CriterionT<:Union{ComputerAdaptiveTesting.NextItemRules.ItemCategoryCriterion, ComputerAdaptiveTesting.NextItemRules.ItemCriterion, ComputerAdaptiveTesting.NextItemRules.StateCriterion}} <: ComputerAdaptiveTesting.NextItemRules.ItemCriterionresponse_expectation::ComputerAdaptiveTesting.NextItemRules.ResponseExpectationcriterion::Union{ComputerAdaptiveTesting.NextItemRules.ItemCategoryCriterion, ComputerAdaptiveTesting.NextItemRules.ItemCriterion, ComputerAdaptiveTesting.NextItemRules.StateCriterion}
This ItemCriterion wraps a a ResponseExpectation and a StateCriterion or ItemCriterion to look at the criterion's expected value for a particular item 1-ply ahead.
ComputerAdaptiveTesting.NextItemRules.FixedRuleSequencer — Type
struct FixedRuleSequencer{RulesT} <: ComputerAdaptiveTesting.NextItemRules.NextItemRulebreaks::Tuple{Int64}rules::Any
ComputerAdaptiveTesting.NextItemRules.GreedyForcedContentBalancer — Type
struct GreedyForcedContentBalancer{InnerRuleT<:ComputerAdaptiveTesting.NextItemRules.NextItemRule} <: ComputerAdaptiveTesting.NextItemRules.NextItemRuletargets::Vector{Float64}groups::Vector{Int64}inner_rule::ComputerAdaptiveTesting.NextItemRules.NextItemRule
This content balancing procedure takes target proportions for each group of items. At each step the group with the lowest ratio of seen items to target is selected.
http://dx.doi.org/10.1207/s15324818ame0403_4
ComputerAdaptiveTesting.NextItemRules.ItemCategoryCriterion — Type
abstract type ItemCategoryCriterion <: ComputerAdaptiveTesting.NextItemRules.SubItemCriterionBaseComputerAdaptiveTesting.NextItemRules.ItemCriterion — Type
abstract type ItemCriterion <: ComputerAdaptiveTesting.ConfigBase.CatConfigBaseComputerAdaptiveTesting.NextItemRules.ItemCriterionRule — Type
struct ItemCriterionRule{NextItemStrategyT<:ComputerAdaptiveTesting.NextItemRules.NextItemStrategy, ItemCriterionT<:ComputerAdaptiveTesting.NextItemRules.ItemCriterion} <: ComputerAdaptiveTesting.NextItemRules.NextItemRulestrategy::ComputerAdaptiveTesting.NextItemRules.NextItemStrategycriterion::ComputerAdaptiveTesting.NextItemRules.ItemCriterion
ItemCriterionRule which together with a NextItemStrategy acts as an adapter by which an ItemCriterion can serve as a NextItemRule.
ItemCriterionRule(bits...; ability_estimator=nothingImplicit constructor for ItemCriterionRule. Will default to ExhaustiveSearch when no NextItemStrategy is given.
ComputerAdaptiveTesting.NextItemRules.MemoryNextItemRule — Type
struct MemoryNextItemRule{MemoryT} <: ComputerAdaptiveTesting.NextItemRules.NextItemRuleitem_idxs::Any
ComputerAdaptiveTesting.NextItemRules.NextItemRule — Type
abstract type NextItemRule <: ComputerAdaptiveTesting.ConfigBase.CatConfigBaseAbstract base type for all item selection rules. All descendants of this type are expected to implement the interface (::NextItemRule)(responses::TrackedResponses, items::AbstractItemBank)::Int.
In practice, all adaptive rules in this package use ItemCriterionRule.
NextItemRule(bits...; ability_estimator=nothing, parallel=true)Implicit constructor for NextItemRule. Uses any given NextItemRule or delegates to ItemCriterionRule the default instance.
ComputerAdaptiveTesting.NextItemRules.NextItemStrategy — Type
abstract type NextItemStrategy <: ComputerAdaptiveTesting.ConfigBase.CatConfigBaseAbstract type for next item strategies, tightly coupled with ItemCriterionRule. All descendants of this type are expected to implement the interface (rule::ItemCriterionRule{::NextItemStrategy, ::ItemCriterion})(responses::TrackedResponses, items) where {ItemCriterionT <: }(strategy::NextItemStrategy)(; parallel=true)::NextItemStrategy`
ComputerAdaptiveTesting.NextItemRules.ObservedInformationPointwiseItemCategoryCriterion — Type
This calculates the pointwise information criterion for an item response model.
ComputerAdaptiveTesting.NextItemRules.PointResponseExpectation — Type
struct PointResponseExpectation{PointAbilityEstimatorT<:ComputerAdaptiveTesting.Aggregators.PointAbilityEstimator} <: ComputerAdaptiveTesting.NextItemRules.ResponseExpectationability_estimator::ComputerAdaptiveTesting.Aggregators.PointAbilityEstimator
This ResponseExpectation gets expected outcomes based on a point ability estimates.
ComputerAdaptiveTesting.NextItemRules.PointwiseItemCategoryCriterion — Type
abstract type PointwiseItemCategoryCriterion <: ComputerAdaptiveTesting.NextItemRules.SubItemCriterionBaseComputerAdaptiveTesting.NextItemRules.PointwiseItemCriterion — Type
abstract type PointwiseItemCriterion <: ComputerAdaptiveTesting.NextItemRules.SubItemCriterionBaseComputerAdaptiveTesting.NextItemRules.RandomNextItemRule — Type
struct RandomNextItemRule{RandomT<:Random.AbstractRNG} <: ComputerAdaptiveTesting.NextItemRules.NextItemRulerng::Random.AbstractRNG: Default: Xoshiro()
This is the most basic rule for choosing the next item in a CAT. It simply picks a random item from the set of items that have not yet been administered.
ComputerAdaptiveTesting.NextItemRules.RandomesqueStrategy — Type
struct RandomesqueStrategy <: ComputerAdaptiveTesting.NextItemRules.NextItemStrategyrng::Random.AbstractRNGk::Int64
http://dx.doi.org/10.1207/s15324818ame0204_6
ComputerAdaptiveTesting.NextItemRules.RawEmpiricalInformationPointwiseItemCategoryCriterion — Type
See EmpiricalInformationPointwiseItemCategoryCriterion for more details.
ComputerAdaptiveTesting.NextItemRules.StateCriterion — Type
abstract type StateCriterion <: ComputerAdaptiveTesting.NextItemRules.CriterionBaseComputerAdaptiveTesting.NextItemRules.UrryItemCriterion — Type
struct UrryItemCriterion{AbilityEstimatorT<:ComputerAdaptiveTesting.Aggregators.PointAbilityEstimator} <: ComputerAdaptiveTesting.NextItemRules.ItemCriterionability_estimator::ComputerAdaptiveTesting.Aggregators.PointAbilityEstimator
This item criterion just picks the item with the raw difficulty closest to the current ability estimate.
ComputerAdaptiveTesting.Rules.CatRules — Type
struct CatRules{NextItemRuleT<:ComputerAdaptiveTesting.NextItemRules.NextItemRule, TerminationConditionT<:ComputerAdaptiveTesting.TerminationConditions.TerminationCondition, AbilityEstimatorT<:ComputerAdaptiveTesting.Aggregators.AbilityEstimator, AbilityTrackerT<:ComputerAdaptiveTesting.Aggregators.AbilityTracker} <: ComputerAdaptiveTesting.ConfigBase.CatConfigBasenext_item::ComputerAdaptiveTesting.NextItemRules.NextItemRule: The rule to choose the next item in the CAT given the current state.
termination_condition::ComputerAdaptiveTesting.TerminationConditions.TerminationCondition: The rule to choose when to terminate the CAT.
ability_estimator::ComputerAdaptiveTesting.Aggregators.AbilityEstimator: The ability estimator, which estimates the testee's current ability.
ability_tracker::ComputerAdaptiveTesting.Aggregators.AbilityTracker: The ability tracker, which tracks the testee's current ability level. Default: NullAbilityTracker()
Configuration of the rules for a CAT. This all includes all the basic rules for the CAT's operation, but not the item bank, nor any of the interactivity hooks needed to actually run the CAT.
This may be more a more convenient layer to integrate than CatLoop if you want to write your own CAT loop rather than using hooks.
CatRules(; next_item=..., termination_condition=..., ability_estimator=..., ability_tracker=...)Explicit constructor for CatRules.
CatRules(bits...)Implicit constructor for CatRules.
ComputerAdaptiveTesting.Stateful — Module
This module defines the interface for a stateful CAT as well as an implementation in terms of CatRules. The interface is meant to enable polymorphic use of different CAT implementations.
ComputerAdaptiveTesting.Stateful.StatefulCat — Type
abstract type StatefulCatAbstract supertype for implementation of the stateful CAT interface.
ComputerAdaptiveTesting.Stateful.StatefulCatRules — Type
struct StatefulCatRules{TrackedResponsesT<:ComputerAdaptiveTesting.Aggregators.TrackedResponses} <: ComputerAdaptiveTesting.Stateful.StatefulCatThis is a the StatefulCat implementation in terms of CatRules. It is also the de-facto standard for the behavior of the interface.
ComputerAdaptiveTesting.Stateful.add_response! — Function
julia add_response!(config::StatefulCat, index::IndexT, response::ResponseT)`
The exact response type ResponseT depends on the item bank. It should be chosen to interoperate with any equivalent item bank according to the implementation in ComputerAdaptiveTesting.jl.
ComputerAdaptiveTesting.Stateful.get_ability — Function
get_ability(config::StatefulCat) -> AbilityTReturn the current ability estimate according to the CAT. The type of the ability estimate AbilityT depends on the CAT implementation but should attempt to interoperate with ComputerAdaptiveTesting.jl.
ComputerAdaptiveTesting.Stateful.get_responses — Function
get_responses(config::StatefulCat) -> Tuple{AbstractVector{IndexT}, AbstractVector{ResponseT}}Returns a tuple of the indices and responses of the items that have been added to the CAT with add_response! so far.
ComputerAdaptiveTesting.Stateful.item_bank_size — Function
julia item_bank_size(config::StatefulCat)`
Return number of items in the current item bank.
ComputerAdaptiveTesting.Stateful.item_criteria — Function
item_criteria(config::StatefulCat) -> AbstractVector{CriteriaT}Returns a vector of criteria values for each item in the item bank.
The criteria can vary, but should attempt to interoperate with ComputerAdaptiveTesting.jl.
ComputerAdaptiveTesting.Stateful.item_response_functions — Function
julia item_response_functions(config::StatefulCat, index::IndexT, ability::AbilityT) -> AbstractVector{Float}`
Return the vector of probability of different responses to item at index for someone with a certain ability according to the IRT model backing the CAT.
ComputerAdaptiveTesting.Stateful.likelihood — Function
likelihood(config::StatefulCat, ability::AbilityT) -> Float64TODO
ComputerAdaptiveTesting.Stateful.next_item — Function
next_item(config::StatefulCat) -> IndexTReturns the index of the best next item according to the CAT.
Ideally IndexT will be an integer and the return type a 1-based index, however it should at least be the same type as accepted by add_response!.
ComputerAdaptiveTesting.Stateful.ranked_items — Function
ranked_items(config::StatefulCat) -> AbstractVector{IndexT}Return a vector of indices of the sorted from best to worst item according to the CAT.
ComputerAdaptiveTesting.Stateful.reset! — Function
reset!(config::StatefulCat)Reset the CAT to its initial state, removing all responses.
ComputerAdaptiveTesting.Stateful.rollback! — Function
rollback!(config::StatefulCat)Rollback the last response added with add_response!.
Some CAT implementations may not support this operation in which case they will throw an error.
ComputerAdaptiveTesting.Stateful.set_item_bank! — Function
set_item_bank!(config::StatefulCat, item_bank::AbstractItemBank)Set the current item bank of the CAT. This will also reset the CAT to its initial state, removing all responses.
Some CAT implementations may not support this operation in which case they will throw an error.
ComputerAdaptiveTesting.Sim.run_cat — Method
Run a given CatLoop with a MaterializedDecisionTree
ComputerAdaptiveTesting.Comparison.CatComparisonConfig — Method
CatComparisonConfig(;
rules::NamedTuple{Symbol, StatefulCat},
strategy::CatComparisonExecutionStrategy,
phases::Union{NamedTuple{Symbol, Callable}, Tuple{Symbol}},
skips::Set{Tuple{Symbol, Symbol}},
callback::Callable
) -> CatComparisonConfigCatComparisonConfig sets up a evaluation-oriented comparison between different CAT systems.
Specify the comparison by listing: CAT systems in rules, a NamedTuple which gives identifiers to implementations of the StatefulCat interface; the strategy to use, an implementation of CatComparisonExecutionStrategy; the phases to run listed as either as a NamedTuple with names of phases and corresponding callbacks or nothing a Tuple of phases to run; and a callback which will be used as a fallback in cases where no callback is provided.
The exact phases depend on the strategy used. See their individual documentation for more.
ComputerAdaptiveTesting.Comparison.run_random_comparison — Function
This function compares a given CAT configuration with a CAT using a random next item selection rule.
ComputerAdaptiveTesting.ItemBanks.DichotomousPointsWithLogsItemBank — Type
struct DichotomousPointsWithLogsItemBank{DomainT} <: FittedItemBanks.PointsItemBankA DichotomousPointsItemBank (inner_bank) with its tabulated response probabilities precomputed in log-space (log_ys), so that likelihoods over many responses can be accumulated by summation instead of repeated multiplication.
ComputerAdaptiveTesting.ItemBanks.LogItemBank — Type
struct LogItemBank{ItemBankT<:FittedItemBanks.AbstractItemBank} <: FittedItemBanks.AbstractItemBankWraps inner, an item bank whose response function FittedItemBanks.log_resp gives log-probabilities, exposing it as an ordinary AbstractItemBank whose resp/resp_vec return ULogarithmic values. Used where response probabilities are so small that computing in log-space avoids underflow.
ComputerAdaptiveTesting.ConfigBase.CatConfigBase — Type
abstract type CatConfigBase