There is possibility to assign class weights while training classifiers, e.g. CatBoost. To the best of my knowledge it adds weight to objects in computation of loss function, therefore penalizing errors on them more or less. Now, if I downsample negative samples with subsample ratio w
, train classifier without weights and then recalibrate predictions with formulae from here
p = p' / ( p' + (1-p') / w)
where p
is probability of positive prediction on original dataset and p'
is from subsampled dataset, will I obtain the same result with just training classifier on sampled dataset with weight of positive class set to w
?