-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add qid as ranklib format #317
Conversation
include/dmlc/data.h
Outdated
@@ -73,6 +73,8 @@ class Row { | |||
const real_t *label; | |||
/*! \brief weight of the instance */ | |||
const real_t *weight; | |||
/*! \brief session-id of the instance */ | |||
const size_t *qid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use int32_t, as size_t is not portable across platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there is worry about possible integer overflow, use uint64_t instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I have changed it to uint64_t.
This is a follow-up of dmlc#317. Due to an incorrect pointer arithmetic, the query-id (qid) information in each row was also being inserted into the `offset` array. To re-produce the problem, run the LibSVMParser.test_qid test without the bug fix.
This is a follow-up of #317. Due to an incorrect pointer arithmetic, the query-id (qid) information in each row was also being inserted into the `offset` array. To re-produce the problem, run the LibSVMParser.test_qid test without the bug fix.
add qid data format like ranklib,for ranking task.
dmlc/xgboost#2748
example:
0 qid:1 1:1.0 2:1.0 5:7.0 7:0.0
1 qid:1 1:0.0 2:1.0 5:2.0 7:0.0 8:0.5
1 qid:2 1:0.0 2:1.0 5:2.0 7:0.0 8:1.0
...