Stopping Criteria – catsim.stopping

All implemented classes in this module inherit from a base abstract class Stopper. Simulator allows that a custom stopping criterion be used during the simulation, as long as it also inherits from Stopper.

Inheritance diagram of catsim.stopping
class catsim.stopping.MaxItemStopper(max_itens: int)[source]

Bases: Stopper

Stopping criterion for maximum number of items in a test

Parameters:

max_itens – the maximum number of items in the test

property max_itens: int

Get the maximum number of items the Stopper is configured to administer.

Returns:

int The maximum number of items the Stopper is configured to administer.

stop(index: int | None = None, administered_items: ndarray | None = None, **kwargs) bool[source]

Checks whether the test reached its stopping criterion for the given user

Parameters:
  • index – the index of the current examinee

  • administered_items – a matrix containing the parameters of items that were already administered

Returns:

True if the test met its stopping criterion, else False

class catsim.stopping.MinErrorStopper(min_error: float)[source]

Bases: Stopper

Stopping criterion for minimum standard error of estimation (see catsim.irt.see())

Parameters:

min_error – the minimum standard error of estimation the test must achieve before stopping

stop(index: int | None = None, administered_items: ndarray | None = None, theta: float | None = None, **kwargs) bool[source]

Checks whether the test reached its stopping criterion

Parameters:
  • index – the index of the current examinee

  • administered_items – a matrix containing the parameters of items that were already administered

  • theta – a float containing the a ability value to which the error will be computed

Returns:

True if the test met its stopping criterion, else False