PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
y_true = [int(x) for x in input().split()]
y_pred = [int(x) for x in input().split()]
from numpy import array
x=[[0.,0.],[0.,0.]]
for i in range(len(y_true)):
if y_true[i]==1:
if y_pred[i]==1:
x[0][0] +=1
else:
x[1][0] +=1
else:
if y_pred[i]==0:
x[1][1] +=1
else:
x[0][1] +=1
print(array(x))
'''
Binary Disorder (DS with python)
'''
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run