Last active
March 4, 2019 21:29
-
-
Save kretes/1228e571aeba2a57f617352af633cd40 to your computer and use it in GitHub Desktop.
xgboost_rank_ndcg_vs_rank_pairwise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 qid:1369666032782981875 0:1.2172619104385376 | |
0 qid:1369666032782981875 0:1.5916666984558105 | |
1 qid:1369666032782981875 0:1.3103448152542114 | |
0 qid:1369666032782981875 0:0.7198443412780762 | |
0 qid:1369666032782981875 0:0.6421052813529968 | |
0 qid:1369666032782981875 0:2.450000047683716 | |
0 qid:1369666032782981875 0:0.3511904776096344 | |
0 qid:1369666032782981875 0:2.110119104385376 | |
0 qid:1369666032782981875 0:1.7380952835083008 | |
0 qid:1369666032782981875 0:1.2692307233810425 | |
0 qid:1369666032782981875 0:1.101190447807312 | |
0 qid:1369666032782981875 0:1.110497236251831 | |
0 qid:1369666032782981875 0:0.75 | |
0 qid:1369666032782981875 0:2.433333396911621 | |
0 qid:1369666032782981875 0:0.7439613342285156 | |
0 qid:1369666032782981875 0:0.5565476417541504 | |
0 qid:1369666032782981875 0:0.6964285969734192 | |
0 qid:1369666032782981875 0:0.720634937286377 | |
0 qid:1369666032782981875 0:0.586309552192688 | |
0 qid:1369666032782981875 0:0.4553571343421936 | |
0 qid:1369666032782981875 0:0.6345177888870239 | |
0 qid:1369666032782981875 0:0.7142857313156128 | |
0 qid:1369666032782981875 0:0.032738097012043 | |
0 qid:1369666032782981875 0:0.4732142984867096 | |
0 qid:1369666032782981875 0:0.4910714328289032 | |
0 qid:1369666032782981875 0:0.4285714328289032 | |
0 qid:1369666032782981875 0:0.449404776096344 | |
0 qid:1369666032782981875 0:0.3988095223903656 | |
0 qid:1369666032782981875 0:0.3452380895614624 | |
0 qid:1369666032782981875 0:0.3839285671710968 | |
0 qid:1369666032782981875 0:0.46000000834465027 | |
0 qid:1369666032782981875 0:0.3482142984867096 | |
0 qid:1369666032782981875 0:0.3214285671710968 | |
0 qid:1369666032782981875 0:0.35748791694641113 | |
0 qid:1369666032782981875 0:0.4166666567325592 | |
0 qid:1369666032782981875 0:0.3511904776096344 | |
0 qid:1369666032782981875 0:0.34408602118492126 | |
0 qid:1369666032782981875 0:0.2708333432674408 | |
0 qid:1369666032782981875 0:0.3392857015132904 | |
0 qid:1369666032782981875 0:0.2589285671710968 | |
0 qid:1369666032782981875 0:0.37735849618911743 | |
0 qid:1369666032782981875 0:1.899999976158142 | |
0 qid:1369666032782981875 0:0.1994047611951828 | |
0 qid:1369666032782981875 0:0.18218623101711273 | |
0 qid:1369666032782981875 0:0.6666666865348816 | |
0 qid:1369666032782981875 0:0.1785714328289032 | |
0 qid:1369666032782981875 0:0.1666666716337204 | |
0 qid:1369666032782981875 0:0.1636904776096344 | |
0 qid:1369666032782981875 0:0.19565217196941376 | |
0 qid:1369666032782981875 0:0.1398809552192688 | |
0 qid:1369666032782981875 0:0.1666666716337204 | |
0 qid:1369666032782981875 0:0.3636363744735718 | |
0 qid:1369666032782981875 0:0.1011904776096344 | |
0 qid:1369666032782981875 0:0.1599999964237213 | |
0 qid:1369666032782981875 0:0.21276596188545227 | |
0 qid:1369666032782981875 0:0.04054053872823715 | |
0 qid:1369666032785346826 0:7.44345235824585 | |
0 qid:1369666032785346826 0:21.053571701049805 | |
0 qid:1369666032785346826 0:6.497023582458496 | |
0 qid:1369666032785346826 0:9.559523582458496 | |
0 qid:1369666032785346826 0:5.80654764175415 | |
0 qid:1369666032785346826 0:6.773809432983398 | |
0 qid:1369666032785346826 0:6.3839287757873535 | |
0 qid:1369666032785346826 0:4.55654764175415 | |
0 qid:1369666032785346826 0:3.169642925262451 | |
0 qid:1369666032785346826 0:5.169642925262451 | |
0 qid:1369666032785346826 0:2.074404716491699 | |
1 qid:1369666032785346826 0:1.753731369972229 | |
0 qid:1369666032785346826 0:4.586309432983398 | |
0 qid:1369666032785346826 0:4.714285850524902 | |
0 qid:1369666032785346826 0:3.5892856121063232 | |
0 qid:1369666032785346826 0:3.657738208770752 | |
0 qid:1369666032785346826 0:2.3333332538604736 | |
0 qid:1369666032785346826 0:3.2771739959716797 | |
0 qid:1369666032785346826 0:3.705357074737549 | |
0 qid:1369666032785346826 0:2.5208332538604736 | |
0 qid:1369666032785346826 0:3.3184523582458496 | |
0 qid:1369666032785346826 0:3.330357074737549 | |
0 qid:1369666032785346826 0:4.083333492279053 | |
0 qid:1369666032785346826 0:4.139881134033203 | |
0 qid:1369666032785346826 0:4.184523582458496 | |
0 qid:1369666032785346826 0:3.732142925262451 | |
0 qid:1369666032785346826 0:2.1190476417541504 | |
0 qid:1369666032785346826 0:4.872023582458496 | |
0 qid:1369666032785346826 0:2.8035714626312256 | |
0 qid:1369666032785346826 0:3.2232143878936768 | |
0 qid:1369666032785346826 0:2.5956521034240723 | |
0 qid:1369666032785346826 0:2.9375 | |
0 qid:1369666032785346826 0:3.6636905670166016 | |
0 qid:1369666032785346826 0:3.809523820877075 | |
0 qid:1369666032785346826 0:2.613095283508301 | |
0 qid:1369666032785346826 0:3.955357074737549 | |
0 qid:1369666032785346826 0:2.824404716491699 | |
0 qid:1369666032785346826 0:1.264880895614624 | |
0 qid:1369666032785346826 0:3.860119104385376 | |
0 qid:1369666032785346826 0:1.6309523582458496 | |
0 qid:1369666032785346826 0:2.267857074737549 | |
0 qid:1369666032785346826 0:3.169642925262451 | |
0 qid:1369666032785346826 0:3.247023820877075 | |
0 qid:1369666032785346826 0:2.9017856121063232 | |
0 qid:1369666032785346826 0:1.6883116960525513 | |
0 qid:1369666032785346826 0:2.9107143878936768 | |
0 qid:1369666032785346826 0:2.529761791229248 | |
0 qid:1369666032785346826 0:2.0731706619262695 | |
0 qid:1369666032785346826 0:1.9940476417541504 | |
0 qid:1369666032785346826 0:2.507042169570923 | |
0 qid:1369666032785346826 0:2.800595283508301 | |
0 qid:1369666032785346826 0:1.4047619104385376 | |
0 qid:1369666032785346826 0:2.4940476417541504 | |
0 qid:1369666032785346826 0:2.4375 | |
0 qid:1369666032785346826 0:2.6011905670166016 | |
0 qid:1369666032785346826 0:1.3777090311050415 | |
0 qid:1369666032785346826 0:2.809523820877075 | |
0 qid:1369666032785346826 0:2.2410714626312256 | |
0 qid:1369666032785346826 0:2.125 | |
0 qid:1369666032785346826 0:2.1875 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xgboost as xgb | |
def train(dm, objective): | |
model = xgb.train(params={ | |
"max_depth": 6, | |
"subsample": 1, | |
"colsample_bytree": 1, | |
"objective": objective, | |
"eval_metric": ["ndcg@60"], | |
"silent": 1, | |
"seed": 42, | |
"booster": "gbtree", | |
"tree_method": "hist" | |
},dtrain=dm, num_boost_round=10, | |
evals=[(dm,"train")], | |
verbose_eval=True, | |
maximize=True) | |
dm = xgb.DMatrix("train.libsvm") | |
train(dm, "rank:pairwise") | |
train(dm, "rank:ndcg") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[22:25:37] 116x1 matrix with 116 entries loaded from /tmp/116 | |
[22:25:37] Tree method is selected to be 'hist', which uses a single updater grow_fast_histmaker. | |
[0] train-ndcg@60:0.815465 | |
[1] train-ndcg@60:1 | |
[2] train-ndcg@60:1 | |
[3] train-ndcg@60:1 | |
[4] train-ndcg@60:1 | |
[5] train-ndcg@60:1 | |
[6] train-ndcg@60:1 | |
[7] train-ndcg@60:1 | |
[8] train-ndcg@60:1 | |
[9] train-ndcg@60:1 | |
[22:25:38] Tree method is selected to be 'hist', which uses a single updater grow_fast_histmaker. | |
[0] train-ndcg@60:0.815465 | |
[1] train-ndcg@60:0.815465 | |
[2] train-ndcg@60:0.815465 | |
[3] train-ndcg@60:0.815465 | |
[4] train-ndcg@60:0.815465 | |
[5] train-ndcg@60:0.815465 | |
[6] train-ndcg@60:0.815465 | |
[7] train-ndcg@60:0.815465 | |
[8] train-ndcg@60:0.815465 | |
[9] train-ndcg@60:0.815465 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment