InferenceAI

Enter at least two characters to search.

Start free

Confusion Matrix

easyEvaluation12 min10 XP

Return [tn, fp, fn, tp] for binary truth and prediction lists.

Examples

EXAMPLE WALKTHROUGHall cells

A guided view of the published example, not a trace of your code.

INPUT[[0,0,1,1],[0,1,0,1]]
TASKconfusion_matrix()
EXPECTED OUTPUT[1,1,1,1]

Start with the input values shown in this example.

Example 1 of 2

Input: y_true = [0,0,1,1], y_pred = [0,1,0,1]

Output: [1,1,1,1]

Explanation: all cells

Input: y_true = [], y_pred = []

Output: [0,0,0,0]

Explanation: empty

Hint 1

Inspect each truth/prediction pair.

Topics

PythonEvaluation