I'm going to use XGBRanker
to make a recommender system.
But in the official docs I haven't found an example of how to prepare the dataset.
So, in which format features and labels should be fitted in XGBRanker
?
I'm going to use XGBRanker
to make a recommender system.
But in the official docs I haven't found an example of how to prepare the dataset.
So, in which format features and labels should be fitted in XGBRanker
?
We need the below dataset for XGBRanker:
Make a note that group information should be an array consisting of the # of elements per group.
For example:
Groups in data: 4
Training, Test: (100,50)
Training Data(X,Y): (100,3)[feature 1, feature 2, feature 3]
Training Label(Y): (100,1)
Training group[A,B,C,D] i.e **grpInfo**: [25,25,10,35]
Note:The sum of grpInfo should be equal to # of records in TrainingSet i.e in this case this is 100
XGBRanker(X[[feature 1, feature 2, feature 3]],Y[[Label]], group=grpInfo)