I am working on a logistic regression binary classification with 1000 rows and 28 columns

While I have split my dataset into train and test, I am using the test data to validate my model. After building the model, I got the below matrxi upon calling .predict()

Please find the confusion matrix below

[[  2  53]
 [  0 190]]

However, my label distribution (in test set) looks like below

0     55
1    190

As you can see that most of my labels are 1 but in confusion matrix above most of them are under True Negative. Shouldn't they be either under True Positive, False negative.

It doesn't make sense to see such a huge number under True Negative. because my actual negative is only 55 records as shown above

Am I making any mistake here? Can you guide me here? Am I constructing/interpreting the confusion matrix incorrectly?


1 Answer 1


As I see it, your model predicted most units (except 2) into class 1, so this checks out (which is garbage, but that is a different issue).

predicted\true 0 1
0 2 53
1 0 190
  • $\begingroup$ Is there anyway to get the headers for my confusion matrix? Since, there is no headers, I thought the 1st column is always 1 and 2nd column is 0 $\endgroup$
    – The Great
    Jan 31, 2022 at 12:21
  • $\begingroup$ May I also know what do you mean by so this checks out? I asl because my eng knowledge is limited $\endgroup$
    – The Great
    Jan 31, 2022 at 12:25
  • $\begingroup$ @TheGreat this checks out = this looks good. Anyway, I don't think you can print the labels, at least not easily. I assume you are using sklearn, in which case check scikit-learn.org/stable/modules/generated/…. $\endgroup$ Jan 31, 2022 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.