Skip to content
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

Merged
merged 14 commits into from
Jan 9, 2018
Merged

add qid as ranklib format #317

merged 14 commits into from
Jan 9, 2018

Conversation

liuliang01
Copy link
Contributor

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
...

@liuliang01 liuliang01 closed this Dec 2, 2017
@liuliang01 liuliang01 reopened this Dec 2, 2017
@@ -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;
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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.

@tqchen tqchen merged commit e882498 into dmlc:master Jan 9, 2018
hcho3 added a commit to hcho3/dmlc-core that referenced this pull request Jun 30, 2018
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.
hcho3 added a commit that referenced this pull request Jun 30, 2018
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants