Computerized Adaptive Testing Simulation – catsim.simulation
¶
Module containing functions relevant to the process of simulating the application of adaptive tests. Most of this module is based on the work of [Bar10].

class
catsim.simulation.
FiniteSelector
(test_size)[source]¶ Base class representing a CAT item selector.

class
catsim.simulation.
Simulable
[source]¶ Base class representing one of the Simulator components that will receive a reference back to it.

preprocess
()[source]¶ Override this method to initialize any static values the Simulable might use for the duration of the simulation. preprocess is called after a value is set for the simulator property. If a new value if attributed to simulator, this method is called again, guaranteeing that internal properties of the Simulable are reinitialized as necessary.


class
catsim.simulation.
Simulator
(items: numpy.ndarray, examinees, initializer: catsim.simulation.Initializer = None, selector: catsim.simulation.Selector = None, estimator: catsim.simulation.Estimator = None, stopper: catsim.simulation.Stopper = None)[source]¶ Class representing the simulator. It gathers several objects that describe the full simulation process and simulates one or more computerized adaptive tests
 Parameters
items – a matrix containing item parameters
examinees – an integer with the number of examinees, whose real \(\theta\) values will be sampled from a normal distribution; or a :py:type:list containing said \(\theta_0\) values

property
administered_items
¶ List of lists containing the indexes of items administered to each examinee during the simulation.

property
bias
¶ Bias between the estimated and true proficiencies. This property is only available after
simulate()
has been successfully called. For more information on estimation bias, seecatsim.cat.bias()

property
duration
¶ Duration of the simulation, in seconds.

property
estimations
¶ List of lists containing all estimated \(\hat\theta\) values for all examinees during each step of the test.

property
examinees
¶ List containing examinees true proficiency values (\(\theta\)).

property
items
¶ Item matrix used by the simulator. If the simulation already occurred, a column containing item exposure rates will be added to the matrix.

property
latest_estimations
¶ Final estimated \(\hat\theta\) values for all examinees.

property
mse
¶ Meansquared error between the estimated and true proficiencies. This property is only available after
simulate()
has been successfully called. For more information on the meansquared error of estimation, seecatsim.cat.mse()

property
overlap_rate
¶ Overlap rate of the test, if it is of finite length.

property
response_vectors
¶ List of boolean lists containing the examinees answers to all items.

property
rmse
¶ Root meansquared error between the estimated and true proficiencies. This property is only available after
simulate()
has been successfully called. For more information on the root meansquared error of estimation, seecatsim.cat.rmse()

simulate
(initializer: catsim.simulation.Initializer = None, selector: catsim.simulation.Selector = None, estimator: catsim.simulation.Estimator = None, stopper: catsim.simulation.Stopper = None, verbose: bool = False)[source]¶ Simulates a computerized adaptive testing application to one or more examinees
 Parameters
initializer – an initializer that selects examinees \(\theta_0\)
selector – a selector that selects new items to be presented to examinees
estimator – an estimator that reestimates examinees proficiencies after each item is applied
stopper – an object with a stopping criteria for the test
verbose – whether to periodically print a message regarding the progress of the simulation. Good for longer simulations.
>>> from catsim.initialization import RandomInitializer >>> from catsim.selection import MaxInfoSelector >>> from catsim.estimation import HillClimbingEstimator >>> from catsim.stopping import MaxItemStopper >>> from catsim.simulation import Simulator >>> from catsim.cat import generate_item_bank >>> initializer = RandomInitializer() >>> selector = MaxInfoSelector() >>> estimator = HillClimbingEstimator() >>> stopper = MaxItemStopper(20) >>> Simulator(generate_item_bank(100), 10).simulate(initializer, selector, estimator, stopper)