Experimenting by addressing the class imbalance problem

In this dataset, the number of patients in the normal, suspect, and pathological categories is not the same. In the original dataset, the number of normal, suspect, and pathological patients are 1,655, 295, and 176, respectively.

We will make use of the following code to develop a bar plot:

# Bar plotbarplot(prop.table(table(data$NSP)),        col = rainbow(3),        ylim = c(0, 0.8),        ylab = 'Proportion',        xlab = 'NSP',        cex.names = 1.5)

After running the preceding code, we obtain the following bar plot:

Proportion of samples in each of the three classes

In the preceding bar plot, the percentages of ...

Get Advanced Deep Learning with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.