I like to understand what is the accuracy of an imbalanced dataset.
Let's suppose we have a medical dataset and we want to predict the disease among the patients. Say, in an existing dataset 95% of patients do not have a disease, and 5% patients have disease. So clearly, it is an imbalanced dataset. Now, assume our model predicts that all 100 out of 100 patients have no disease.
Accuracy means = (TP+TN)/(TP+TN+FP+FN)
If the model predicts 100 patients do not have a disease and we are predicting disease among the patient then True positive refers to the disease among the patient and True negative refers to no disease among the patient.
In that case accuracy should be (0+100)/(0+100+0+0) = 1.
We are going to predict how many patients have a disease so if we get accuracy 1, does that mean 100% of patients have the disease?
I am taking the example from 5 Techniques to Handle Imbalanced Data For a Classification Problem . I am not sure at the time of accuracy calculation why they calculate it as (0+95)/(0+95+0+5) = 0.95, if they have already described that their model predicts all 100 out of 100 patients have no disease.
I hope I clarified my question. Thank you.