I have a model with an imbalanced dataset, lets say 5% of the rows are from the positive class. If I resample my data using something like SMOTE, or removing rows from the larger class (downsampling), I can change that imbalance to ~40%.
This works well and the performance in training is good (good performance on train/valid data). But when this model makes predictions in production, the precision is much lower (25% compared with 75% in training) and the recall is much higher (99% compared with 80%). As such, I am wondering whether this is because of the resampling.. The model thinks that the positive case is much more likely to occur than it actually is.
I have checked for data leakage, and cant find any issues. I am also stopping my model once performance plateaus (although many of the predictions are either close to 0 or 100% class probability, which seems odd to me). Any ideas?