A fraud model predicts 1 (fraud) or 0 (not fraud). An interviewer asks you to build the confusion matrix without any machine learning library. The labels are illustrative.
Store a 2 by 2 array laid out as [[TN, FP], [FN, TP]]:
Expected answer
Store your answer in result.
Hints, the later steps and the answer come with Pro.
import numpy as np actual = np.array([0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0]) pred = np.array([0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0]) result = ...