We are oversampling the data to use in logistic regression. Aim is to predict CTR(click probability) which is rare event scenario. I have predicted the probabilities of click but CTR results are inflated as we over sampled positive class.

model2<-SMOTE(V61 ~ ., z2, perc.over = 600,perc.under=100, learner = 'glm',family=binomial())

Is there any way to undo oversampling results so that I can get exact probabilities ? Based on research so far, one easiest way to divide the output probability by the multiplier we used in over sampling. I dont feel it would be the exact way as I have used synthetic minority over sampling technique(SMOTE) in R.

  • $\begingroup$ Are you sure you need to oversample? Logistic regression does not suffer from an imbalance in classes. $\endgroup$ – Matthew Drury Jan 22 '17 at 0:28

It doesn't work just to divide the probabilities. Basically you have to adjust the odds, not the probabilities.

There's a nice description and some sample calculations here: https://yiminwu.wordpress.com/2013/12/03/how-to-undo-oversampling-explained/

(added in edit) There's a different derivation that gives the same results here:


That blog post is a bit simpler to understand.

I'm not a SMOTE user, and can't comment on the particular applicability to SMOTE.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.