Using your CAT

Now you've created your cat according to Creating a CAT, there are a number of ways you can use it. This section covers a few. See also the Examples.

When you've set up your CAT using CatRules, you can wrap it in a CatLoopConfig and run it with run_cat.

ComputerAdaptiveTesting.CatConfig.CatLoopConfigType
struct CatLoopConfig
CatLoopConfig(; rules=..., get_response=..., new_response_callback=...)
  • 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). Default: nothing

Configuration for a simulatable CAT.

source
ComputerAdaptiveTesting.Sim.run_catFunction
run_cat(cat_config::CatLoopConfig, item_bank::AbstractItemBank; ib_labels=nothing)

Run a given CatLoopConfig 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.

source

Run a given CatLoopConfig with a MaterializedDecisionTree

source

Simulating CATs

You might like to use a response memory or simulated responses to simulate your CAT using auto_responder:

In case your data is different you might like to modify the implementation:

function auto_responder(responses)
    function (index, label_)
        responses[index]
    end
end
auto_responder (generic function with 1 method)

Integrating into a user-facing applications

A simple interactive implementation of get_response(...) is prompt_response:

For other types of interactivity you can modify the implementation:

function prompt_response(index_, label)
    println("Response for $label > ")
    parse(Int8, readline())
end
prompt_response (generic function with 1 method)