Why confusion matrix calculation is more effective than measuring the classification accuracy?

Why confusion matrix calculation is more effective than measuring the classification accuracy?

It shows how any classification model is confused when it makes predictions. Confusion matrix not only gives you insight into the errors being made by your classifier but also types of errors that are being made. This breakdown helps you to overcomes the limitation of using classification accuracy alone.

Why is training accuracy higher than testing accuracy?

Test accuracy should not be higher than train since the model is optimized for the latter. Ways in which this behavior might happen: you did not use the same source dataset for test. You should do a proper train/test split in which both of them have the same underlying distribution.

What are the scenarios which have higher training accuracy and low test accuracy called?

A model that is underfit will have high training and high testing error while an overfit model will have extremely low training error but a high testing error.

How is confusion matrix related to train accuracy?

Your confusion matrix tells us how much it is overfitting, because your largest class makes up over 90% of the population. Assuming that you test and train set have a similar distribution, any useful model would have to score more than 90% accuracy: A simple 0R-model would. Your model scores just under 80% on the test set.

Why do you need confusion matrix for imbalanced datasets?

Accuracy on Imbalanced Datasets and Why, You Need Confusion Matrix! The reasons for using confusion matrix while dealing with imbalanced datasets. An imbalanced dataset is a kind of data distribution where one or more classes have the most number of samples belonging to their class than the other classes.

What should the confusion matrix look like in Python?

Assuming that you test and train set have a similar distribution, any useful model would have to score more than 90% accuracy: A simple 0R-model would. Your model scores just under 80% on the test set. If you would look at the confusion matrix relatively (in percentages) it would look like this:

How is a confusion matrix used in classification?

A confusion matrix is a summary of the predictions made by a classification model organized into a table by class. Each row of the table indicates the actual class and each column represents the predicted class. A value in the cell is a count of the number of predictions made for a class that are actually for a given class.