LearnPy Hub
← Machine Learning: scikit-learn problems
Medium

Confusion Matrix

Read true and predicted labels for a yes/no problem (0 or 1) and print the 2x2 confusion matrix: row 0 then row 1, numbers separated by spaces.

Input

Two lines of 0s and 1s: true labels, then predictions.

Output

Two lines, two integers each.

Sample 1

Input
0 0 1 1 0 1
0 1 1 0 0 1
Output
2 1
1 2

Sample 2

Input
1 1 1 1
1 1 1 1
Output
0 0
0 4
solution.py
Output appears here
Hints
Confusion Matrix · Python practice problem · LearnPy Hub