I want to have the real labels of SoftMax ‘output matrix and calculate the confusion matrix to know the performance of my model e.g. Accuracy for each label. The shape of y_pred is (1135,6) and y_test is (1135, ).
y_pred:
array([[5.63838069e-15, 4.49124792e-22, 1.70582300e-03, 9.98294175e-01,
6.43675001e-16, 5.18157286e-08],
[4.47809906e-22, 1.06405335e-19, 9.99843001e-01, 1.57030590e-04,
2.76202466e-30, 4.41898809e-17],
[1.71584970e-17, 1.95483637e-24, 3.00669862e-13, 1.00000000e+00,
7.63759589e-19, 3.53933007e-18],
...,
[1.90624938e-08, 0.00000000e+00, 1.78032694e-16, 2.00390571e-09,
1.29498029e-15, 1.00000000e+00],
[1.50917319e-19, 1.17262857e-16, 1.72155957e-14, 1.00000000e+00,
0.00000000e+00, 5.56629790e-19],
[0.00000000e+00, 4.34668734e-30, 5.76211607e-30, 1.00000000e+00,
1.20244761e-33, 0.00000000e+00]], dtype=float32)
y_test:
array([2., 2., 3., ..., 5., 3., 3.])
New contributor
km1394124 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.