0
pd.DataFrame(confusion_matrix(y_test , predict), columns=["No Mask","Mask"], index =["No Mask","Mask"])

ValueError: Shape of passed values is (1, 1), indices imply (2, 2)

How to correct this error

Quang Hoang
  • 146,074
  • 10
  • 56
  • 74
  • 3
    `confusion_matrix(y_test , predict)` is not of the correct shape. What is the output of `confusion_matrix(y_test , predict).shape`? – mozway May 09 '23 at 13:39

0 Answers0