3
$\begingroup$

I am building a binary classification model which has 17K values as class A and 10K values as class B. I want to know when a dataset can face the issues of "IMBALANCED Dataset" ?

$\endgroup$

2 Answers 2

4
$\begingroup$

In general there will be not a hard rule about this, but this dataset seems to be like balanced. The point about disbalanced is that you have to keep in mind that the accuracy of your model will have a different starting point. For this python has the function to run a baseline with dummy classification. https://scikit-learn.org/stable/modules/generated/sklearn.dummy.DummyClassifier.html. This gives you a good indication what is your baseline (if you choose the the strategy to most_frequent). In your case, any prediction model which always forecast class A, would have a accuracy of: 17/(10+17) = 0,6296... , so any binary classification with a score under this value would be really bad

$\endgroup$
1
  • $\begingroup$ Okay, makes more sense now! $\endgroup$
    – Sca
    Commented Jun 18, 2019 at 4:14
1
$\begingroup$

There is no strict definition about when to call a dataset "imbalanced", but generally speaking it's when the imbalance is likely to cause a problem with the model. Typically the problem is that the model will use the majority class as a default, because assigning the majority class is far less likely to be an error: for example if the data consists of 99% class A and 1% class B, a model which always predicts A will achieve 99% accuracy.

Your case would not be called imbalanced: the minority class makes up a large proportion of the data so it's very unlikely that the model would ignore it.

$\endgroup$
1
  • $\begingroup$ Thank you for the explanation. $\endgroup$
    – Sca
    Commented Jun 18, 2019 at 4:14

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.