Test set larger than train set There is a two class dataset with 1121 values in total, having 230 from same class and 891 from the other class. The training set is choosen as 230+230=460 from both classes and the test set as the entire 1121 data.
1)Accuracy values are less than 0,50 even some are as low as 0,18 and 0,20. Does this make sense? For a two class outcome, there is more chance for an accurate prediction if I toss a coin. Can there be an accuracy of less than 0.50 for a two class prediction?
2)When both test-train set is choosen from the 460 class balanced rows and k-fold(1:10) is made, the accuracy levels are considerably higher, up to 0,90.
3)Can the difference between the results be because the test set is much larger than the train set?
Do I correctly understand, that the test data is the whole dataset, whereas training is only a subset of it? Training and test data must not overlap. The test is a measure of quality on unseen, unfamiliar data.
In the case of inbalanced data and two class classification the naive classifier, predicting always the most probable class has the quality 891 / 1121. Any sensbible model should beat this score.
To handle inbalanced data you can use several approaches - undersampling the majority class, oversampling the minority https://machinelearningmastery.com/random-oversampling-and-undersampling-for-imbalanced-classification/. Also many classifiers have the attribute weights, which can be set to balanced - this would penalize larger for mistakes on minority class.
In the case of imbalanced data measure not only accuracy, but precision and recall as well https://en.wikipedia.org/wiki/Precision_and_recall