Skip main navigation

Confusion matrix and multiclassification

And here is to explain about a little bit about the confusion matrix is. The confusion matrix is the results from the machine learning outcomes for binary classifications. And for in machine learning, you will have two positive, false negative, false positive, and also two negatives here. And if like the confusion matrix like this, how you can calculate the accuracy, also Recall, Precision, and the F measure here. So that is all of the formulas that you can use to calculate the measurement matrix from the confusion matrix. So in case, for example, you have recall equal to one and Precision equal to zero even you have a high accuracy.
However, the performance can be trick is not good because you have an imbalanced problem, imbalance in the results. Like this, if you have a record equal to one precision equal to zero, so F measure equal to one up to zero so the performance is not good. And this is an example from the Weka, and here is the example from that figure. So after the results, you can see that you have a confusion matrix. And from confusion matrix, you can calculate the TP, FP, TN, and FN, here. And from TP, FP, TN, and FN, you can have some measurement matrix like the recall here.
The recall equal to 56 percent, and for precision you can calculate as 59% and finally the accuracy is reached 79%. And another classification we focus is multi-classification because in real case you focus a lot in multi-classification means that you predict a lot of classes not only binary classification, and in multi-classification, each training point belongs to one of N different classes. And the goal is to construct a function given a new data point will correctly predict the class to the new point belongs. Like here, you have five class from class 1 to class 5, and our model aims to predict the new data point belong to which classes. And here is the difference between multi-classification and also the binary classification.
So if binary classification, you have two classes just like one vs all here. If you treat the multi classifications like one vs all here, and you can trick five multi-classification into different five single binary classification with like the class one, and then class one, class two and class three and so on. However in machine learning you can even use… you can even trick multi-classification as all vs all here means you try to provide all of the classes into machine learning algorithms and produce the result. And here is the difference in the confusion matrix in multi-classification between one vs all and also the all vs all here.
If in one vs all you can have a high performance because you can try to perform some hyper parameters optimizations in each binary classification. However, in multi-classification you need to perform a hyper parameters optimizations in only one problem. And however, for one vs all, it has a very simple confusion matrix, and in multi-classification, this is a complex confusion matrix and then you can easy to calculate the accuracy in one vs all. But in multi-classification, even it’s faster and more memory efficient. So it’s not easy to calculate and performance is not better than the one vs all.

In this video, Dr. Khanh will introduce the confusion matrix. The confusion matrix is the results from the machine learning outcomes for binary classifications. He will explain how this matrix works. Next, he will continue on introducing another classification method, multi-classification.

This article is from the free online

Artificial Intelligence in Bioinformatics

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now