True Positive
noun
say it: “TROO POZ-ih-tiv” /ˈtru ˈpɑzətɪv/
A case where a test or model says 'yes' and the real answer is yes.
What is a true positive?
A true positive is a yes the model got right: it flagged an example that really is the positive class, such as a fraud it caught. In scikit-learn's confusion matrix for two classes, it's the bottom-right count.
actual = [1, 0, 0, 1, 1, 0] # 1 = fraud
guessed = [1, 0, 1, 0, 1, 0]
print(sum(a == 1 and g == 1 for a, g in zip(actual, guessed))) # 2: frauds caught
In a sentence
- “Each fraud the check caught counted as a true positive.”
- “A spam email sent to junk is a true positive for the filter.”
Level: Apprentice · More AI Basics terms at this level
Updated