Can anyone please help me with my code?
Given two lists of 1s and 0s (1 represents the true label, and 0 represents the false false) of the same length, output a 2darrary of counts, each cell is defined as follows Top left: Predicted true and actually true (True positive) Top right: Predicted true but actually false (False positive) Bottom left: Predicted false but actually true (False negative) Bottom right: Predicted false and actually false (True negative) Sample Input 1 1 0 0 1 0 0 0 Sample Output [[1., 0.], [1., 2.]] My code outputs: [[1 0] [1 2]] Where can I get those dots??? Don't care about commas, i don't know why, but the answer without them is correct. My code: import numpy as np y_true = [int(x) for x in input().split()] y_pred = [int(x) for x in input().split()] y_true = np.array(list(map(lambda x: 0 if x == 1 else 1, y_true))) y_pred = np.array(list(map(lambda x: 0 if x == 1 else 1, y_pred))) from sklearn.metrics import confusion_matrix print(confusion_matrix(y_pred, y_true)) print(type(confusion_matrix(y_pred, y_true))) #in addition, just to be sure. I delete this "print" when I run the code