The function seems to expect certain kind of scores for targets and non-targets, not truths and predictions. You can find other implementations in different packages. (General caution for beginners such as myself: it’s crucial to pay attention to how mature the packages are, and the more rough and abandoned it looks, the more you need to understand the source code to trust it.)