question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for group in learning to rank in lightgbm

See original GitHub issue
import optuna.integration.lightgbm as lgb

params = {
    'objective': 'lambdarank',
    'metric': 'lambdarank',  # alias to ndcg.
    'eval_at': 3,
    'boosting_type': 'gbdt',
    
}

lgb.train(params,X_train, y_train, group=query_train,
        eval_set=[(X_val, y_val)], eval_group=[query_val], 
        eval_at=[3, 5])

the above throws an error

---> 33     auto_booster = LightGBMTuner(*args, **kwargs)
     34     booster = auto_booster.run()
     35     return booster

TypeError: __init__() got an unexpected keyword argument 'group'

grouping allows for keeping queries together.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
toshihikoyanasecommented, May 26, 2020

@gauthamzz Let me close this issue. Please feel free to re-open it or create new PRs if you have further problems.

0reactions
github-actions[bot]commented, May 25, 2020

This issue has not seen any recent activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lightgbm.LGBMRanker — LightGBM 3.3.3.99 documentation
scikit-learn doesn't support ranking applications yet, therefore this class is not really compatible with the sklearn ecosystem.
Read more >
How to implement learning to rank using lightgbm?
I would recommend using at least 1 validation set during training. Note that both of them are pandas dataframes, LightGBM supports them, ...
Read more >
LightGBM Ranker does not have a coding guideline ... - Medium
Targets for training are determined in my code using the well-known NDCG measure for Learning-To-Rank. To highest NDCG@100 means the model has ...
Read more >
Understanding LightGBM Parameters (and How to Tune Them)
In this outstanding paper, you can learn all the things about DART gradient boosting ... Tuning lightgbm parameters may not help you there....
Read more >
Ranking with LightGBM Models - Vespa Documentation
Vespa supports importing LightGBM's dump_model . ... of how to train a ranking function, using learning to rank with ranking losses, in this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found