Profile
Back to NewsBack
GitHub Trending 3 min
Reader Mode
douglasrizzo/catsim: Computerized Adaptive Testing Simulator

douglasrizzo/catsim: Computerized Adaptive Testing Simulator

8 hours ago

Logo

CI/CD</a> codecov</a> Latest Version</a> Digital Object Identifier</a>

A Python package for computerized adaptive testing (CAT). It provides a reusable CAT engine, simulation tools, and multiple methods for:

These methods can either be used in a standalone fashion to power other software or be used with _catsim_ to run and simulate computerized adaptive tests, given a sample of examinees, represented by their ability levels, and an item bank, represented by their parameters according to some logistic Item Response Theory model.

Installation

Install it using pip install catsim.

Basic Usage

Tutorial notebooks are available in the repository under notebooks/:

The main architecture decisions behind the current engine and simulation model are documented as Architecture Decision Records.
  1. Have an item matrix;
  2. Have a sample of examinee proficiencies, or a number of examinees to be generated;
  3. Create an initializer,
an item selector, a ability estimator and a stopping criterion;
  1. Create a simulation runner
with those components.
  1. Run the simulation and inspect the returned result object;
  2. Plot your results.
from catsim.initialization import RandomInitializer
from catsim.selection import MaxInfoSelector
from catsim.estimation import NumericalSearchEstimator
from catsim.stopping import MinErrorStopper
from catsim.simulation import SimulationRunner
from catsim import ItemBank
initializer = RandomInitializer()
selector = MaxInfoSelector()
estimator = NumericalSearchEstimator()
stopper = MinErrorStopper(0.4, max_items=20)
runner = SimulationRunner(ItemBank.generate_item_bank(100), initializer, selector, estimator, stopper)
result = runner.run(10)
print(result.rmse)

Dependencies

Runtime dependencies are declared in pyproject.toml and are installed automatically with pip install catsim or uv pip install catsim.

If you are contributing from a clone of the repository, install the full developer toolchain (tests, linting, type checking, notebooks, coverage, mutation testing) with:

uv sync --group dev

To build the HTML documentation locally, install Sphinx and its extensions with:

uv sync --group docs

Compatibility

_catsim_ is compatible and tested against Python 3.11, 3.12, 3.13, and 3.14.

Important links

  • Official source code repo:
  • HTML documentation (stable release):
  • Issue tracker:

Citing catsim

You can cite the package using the following bibtex entry:

@article{catsim,
  author = {Meneghetti, Douglas De Rizzo and Aquino Junior, Plinio Thomaz},
  title = {Application and simulation of computerized adaptive tests through the package catsim},
  year = 2018,
  month = jul,
  archiveprefix = {arXiv},
  eprint = {1707.03012},
  eprinttype = {arxiv},
  journal = {arXiv:1707.03012 [stat]},
  primaryclass = {stat}
}

What's a CAT

Computerized adaptive tests are educational evaluations, usually taken by examinees in a computer or some other digital means, in which the examinee's ability is evaluated after the response of each item. The new ability is then used to select a new item, closer to the examinee's real ability. This method of test application has several advantages compared to the traditional paper-and-pencil method or even linear tests applied electronically, since high-ability examinees are not required to answer all the easy items in a test, answering only the items that actually give some information regarding his or hers true knowledge of the subject at matter. A similar, but inverse effect happens for those examinees of low ability level.

More information is available in the docs and over at Wikipedia.

If you are looking for IRT item parameter estimation

_catsim_ does not implement item parameter estimation. I have had great joy outsourcing that functionality to the mirt R package along the years. However, since many users request packages with item parameter estimation capabilities in the Python ecosystem, here are a few links. While I have not used them personally, specialized packages like these are hard to come by, so I hope these are helpful.

Chat with me