Class Imbalnace Approach

Hello everyone,

I am rather new to pytorch but i used it anyway for my project. The project I deal with is Driver Anomaly Detection. The particular dataset was constructed as an Anomaly Detection project and used unsupervised learning by comparing higher dimension vectors (cosine similarity) in the end. For my project i have altered it a little by applying binary classification implementation (anormal and normal driving). The problem is that the dataset itself has a lot more normal videos (85% normal, rest are anormal) videos. I have tried using data augmentations to stabilize more my data and i have also used WeightedRandomSampler as I have read in this forum. Also, i tried including the parameter pos_weight in the scope and the weight_decay in the optimizer. My questions are the below:

  1. When we use WeightedRandomSampler or pos_weight(for this instance), should we use only one of them or both?

  2. I read in a few websites about the value and importance of weight_decay. What would be a great value for it regaarding the learning rate.

  3. Finally, because the test_set has a few unseen scenarios, my test_accuracy is quite bad (which was the reason i introduced augmentations to make the model more diverse towards anomaly driving). What bothers me though is that i can achieve high train_accuracy (80% and above ) from the first epoch too. Should I change my approach from binary classification or not?

The Model Architecture I used is a ConvGRU approach, 3D ConvNet + 2D ConvNet and GRU in those features with a classifier in the end.

Thanks in advance!!