1
$\begingroup$

I have a learning to rank task at hand and I want to use the lightgbm implementation of LambdaMART. I'm also following this notebook.

param = {
"task": "train",
"num_leaves": 255,
"min_data_in_leaf": 1,
"min_sum_hessian_in_leaf": 100,
"objective": "lambdarank",
"metric": "ndcg",
"ndcg_eval_at": [1, 3, 5, 10],
"learning_rate": .1,
"num_threads": 2}

res = {}
bst = lgb.train(
    param, train_data, 
    valid_sets=[valid_data], valid_names=["valid"],
    num_boost_round=50, evals_result=res, verbose_eval=10)

In the params, the objective is set to lambda-rank which is another learning to rank algorithm. My question is, how do I implement LambdaMART with lightgbm ? What set of paramters should I use to implement LambdaMART with lightgbm ?

$\endgroup$

1 Answer 1

0
$\begingroup$

Looks like the implementation of lambdaMART in the notebook referenced in the question is correct.

From the paper titled, From RankNet to LambdaRank to LambdaMART: An Overview, it is clearly mentioned in the first line of the paper that :

LambdaMART is the boosted tree version of LambdaRank, which is based on RankNet.

So, the code that's pasted above clearly says that, the objective function is LambdaRank. There is one more arguement called boosting_type which is set to gbdt by default. The LambdaRank + gbdt is what LambdaMART is in essence.

So, just pasting the above code for completion sake:

param = { "task": "train", 
          "num_leaves": 255,
          "min_data_in_leaf": 1,
          "min_sum_hessian_in_leaf": 100,
          "objective": "lambdarank",
          "boosting_type": "gbdt",
          "metric": "ndcg",
          "ndcg_eval_at": [1, 3, 5, 10],
          "learning_rate": .1,
          "num_threads": 2 }

res = {}
bst = lgb.train(
param, train_data, 
valid_sets=[valid_data], valid_names=["valid"],
num_boost_round=50, evals_result=res, verbose_eval=10)

This is how we can use lightgbm to train lambdaMART.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.