What is the classification accuracy of a random classifier?

5

1

I have a build a classification model using machine learning technique (SVM). I want to compare the classification accuracy of my model with a random classifier. My data set contains only two classes(1 or 0). The ratio of 1 and 0 instances are 35% and 65%. That means, 35% instances belong to 1 and 65% belong to 0 class. In that case, what will be the classification accuracy of random classifier (Random Guess)?

Soikot Ali

Posted 2018-11-07T10:44:48.353

Reputation: 53

Answers

4

The equation of the classification accuracy for a random classifier (Random guess) is as follows:

Accuracy = 1/k (here k is the number of classes). In your case, the value of k is 2.

So, the classification accuracy of the random classifier in your case is 1/2 = 50%

Rejaul Karim

Posted 2018-11-07T10:44:48.353

Reputation: 843

Thank you very much for your support. Now, I understand it. – Soikot Ali – 2018-11-07T11:03:39.817

2This is true if your random classifier gives even odds to all outcomes. But you could randomly choose 0 with probability .99 and 1 with probability .01 which would have an accuracy of 0.647 = 0.990.65 + 0.010.35 – kbrose – 2018-11-07T13:38:14.553

Thank you very much @kbrose. If my test dataset contains 20 instances (13 instances 0 and 7 instances 1). Then, what will be the accuracy of the random classier? Based on your explanation, I guess first I have to calculate accuracy for each instance. Second, sum up accuracy for all instances. Then calculate average accuracy by dividing 20. Am I understand correctly? – Soikot Ali – 2018-11-07T22:39:10.980