Questions tagged «ranking»

2
xgBoost中的成对排名模型如何拟合?
据我所知,要训练学习对模型进行排名,您需要在数据集中包含三件事: 标签或相关性 组或查询ID 特征向量 例如,Microsoft Learning to Rank数据集使用此格式(标签,组ID和功能)。 1 qid:10 1:0.031310 2:0.666667 ... 0 qid:10 1:0.078682 2:0.166667 ... 我正在尝试利用GBM进行成对排名的xgBoost。他们有一个排名任务的示例,该任务使用C ++程序在上述Microsoft数据集上学习。 但是,我正在使用他们的Python包装器,似乎无法找到可以在其中输入组ID的地方(qid上述)。我可以仅使用功能和相关性分数来训练模型,但是我感觉自己缺少一些东西。 这是一个示例脚本。 gbm = XGBRegressor(objective="rank:pairwise") X = np.random.normal(0, 1, 1000).reshape(100, 10) y = np.random.randint(0, 5, 100) gbm.fit(X, y) ### --- no group id needed??? print gbm.predict(X) # should be in …
14 search  ranking  xgboost  gbm 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.