XGBoost ranking file format The xgboost package has two files that must be used for ranking:


train.txt with the data
train.txt.group with the group of each observation


I don't understand two things in each file:


What should I use as positive/negative classes? In ranking, there is no such thing as a positive/negative class...
What should I use as group? Say that I have observations x1 > x2 > x3. How do I express this lexicographical order using groups?
Since I asked this question, it seems the documentation was expanded:

We need to provide a ".group" file. For example, the file could be


2
3

  
  This means that, the data set contains 5 instances, and the first two
  instances are in a group and the other three are in another group. The
  numbers in the group file are actually indicating the number of
  instances in each group in the instance file in order.