Convert predicted probabilities after downsampling to actual probabilities in classification (using mlr)
问题 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. How can I convert these probabilities to actual probabilities for the unbalanced data? Is the a conversion argument/function implemented in the mlr package or another package? For example: a <- data.frame(y=factor(sample(0:1, prob = c(0.1,0.9), replace=T, size=100))) a$x <- as.numeric(a$y)+rnorm(n=100, sd=1) task <