Hello,

Im currently trying to rank products using the XGBRanker using the objective: ‘rank:ndcg’.

I have seen the sample Implementation of this package in the official xgboost support. The data set used in the sample seemed to be for search result ranking, since it had query document pairs(x) and the relevance (y).

My data set, however is one has a list of products(can be all grouped into one category) along with their features. The relevance is a score (continuous) calculated using a formula. The value of relevance could be between 0-1, where 0 is no relevance and 1 is the highest relevance.

I have converted the data set(sample of 500) into LibSVM format and passed it to the model.

The model was created, but i am not able to interpret the predictions of the test set. The model.predict(x_test_sample) returns an array of 0.5 for the whole size.

This makes me wonder the below, whether I can use the XGBRanker for a Listwise ranking the below scenario ?

- Complete data set falls under one group.
- The relevance is a continuous variable between 0-1