xgboost icon indicating copy to clipboard operation
xgboost copied to clipboard

AMS weight rescaling

Open BlindApe opened this issue 12 years ago • 1 comments

Using xgb.cv with 8 folds, test_AMS are in 1.10 range which is the mean of AMS of each fold.

I think the problem is the rescaling in AMS function

With Higgs train data the sum of positive weights is wS = 691.9886 and for negative wB = 410999.8

So in order all AMS be comparable we need in each fold the sum of positive and negative be wS and wB

in R: weight_fold[labels == 0] <- weight_fold[labels == 0] * wB / sum(weight_fold[labels == 0]) weight_fold[labels == 1] <- weight_fold[labels == 1] * wS / sum(weight_fold[labels == 1])

BlindApe avatar Sep 10 '14 22:09 BlindApe

You can do that with fpreproc preprocessing function in python module: https://github.com/tqchen/xgboost/blob/master/demo/kaggle-higgs/higgs-cv.py

In R, however, this is not yet supported

tqchen avatar Sep 10 '14 22:09 tqchen