5
$\begingroup$

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)?

$\endgroup$
4
$\begingroup$

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%

$\endgroup$
  • $\begingroup$ Thank you very much for your support. Now, I understand it. $\endgroup$ – Soikot Ali Nov 7 '18 at 11:03
  • 2
    $\begingroup$ This 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.99*0.65 + 0.01*0.35 $\endgroup$ – kbrose Nov 7 '18 at 13:38
  • $\begingroup$ 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? $\endgroup$ – Soikot Ali Nov 7 '18 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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