# Train/Test size and bias

I'm running a classifier (logistic regression). The information on my dataset are the following:

dataset size= 279 observations


(80/20 rule)

train size= 233
test size = 56

# of events in train = 31
# of events in test = 8


I think my classifier and results may be affected due to this not equal proportion. Is there any way to avoid bias issues and improve accuracy? What do you personally think of such data?

• stats.stackexchange.com/a/453377 , refer here – Aymuos Aug 31 '20 at 2:34
• The event proportion isn't identical between the train and test set, but it actually can't get any closer with any other split - I'm not seeing much of a problem at all here. – Nuclear Hoagie Aug 31 '20 at 15:48

To complete @BenjiAlbert answer, in case of imbalanced dataset, it is also recommended to use stratified k-fold to preserve the relative class frequencies in each fold. You can find more details in the sklearn user guide here.