2
$\begingroup$

If I use undersampling in case of an unbalanced binary target variable to train a model, the prediction method calculates probabilities under the assumption of a balanced data set. I discovered two formulas to convert these probabilities to actual probabilities for the unbalanced data:

p = beta * p_s / ((beta-1) * p_s + 1) from https://www3.nd.edu/~rjohns15/content/papers/ssci2015_calibrating.pdf

and

1/(1+(1/original fraction-1)/(1/oversampled fraction-1)*(1/scoring result-1)) which is described in http://www.data-mining-blog.com/tips-and-tutorials/overrepresentation-oversampling/.

In an example I used they yielded the same result, however the first one doesn't use the oversampled fraction of the target variable's classes. Does anyone know they are exchangable or if one of them is better in certain situations?

$\endgroup$
0
$\begingroup$

The two formulas are equivalent (the first is rather more elegant, IMO).

| cite | improve this answer | |
$\endgroup$

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.