metasignal: A Python Package for Comprehensive Metacognitive Analysis and Decision-Making

Ranjan, Saurabh, Makwana, Mukesh, Sokratous, Konstantina, Odegaard, Brian

–arXiv.org Artificial Intelligence 

ABSTRACT metasignal is an open-source Python package for signal detection theory (SDT) and metacognitive measurement. It implements the 17 metacognitive measures evaluated by Rahnev (2025), together with the reference variables d' (perceptual sensitivity), response criterion c (response bias), and mean confidence. A single function computes the complete set from trial-level stimulus, response, and confidence arrays. The package also provides a command-line interface, group summaries, bootstrap confidence intervals, permutation tests, optional hierarchical Bayesian models, and information-theoretic measures. Metacognition is the ability to evaluate the quality of one's own decisions.