Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于LGBMRanker objective用binary的疑问 #4

Open
jt120 opened this issue Jul 5, 2020 · 3 comments
Open

关于LGBMRanker objective用binary的疑问 #4

jt120 opened this issue Jul 5, 2020 · 3 comments

Comments

@jt120
Copy link

jt120 commented Jul 5, 2020

大佬,我看你用了LGBMRanker,objective又是binary,是为了加group吗?

这样可以把不同数量的用户,分到不同的组?

lgb_ranker = lgb.LGBMRanker(
        boosting_type='gbdt', num_leaves=31, reg_alpha=0.0, reg_lambda=1,
        max_depth=-1, n_estimators=300, objective='binary',
        subsample=0.7, colsample_bytree=0.7, subsample_freq=1,
        learning_rate=0.01, min_child_weight=50, random_state=2018,
        n_jobs=-1) 


g_train = train_final_df.groupby(['user_id'], as_index=False).count()["label"].values

@xuetf
Copy link
Owner

xuetf commented Jul 5, 2020

大佬,我看你用了LGBMRanker,objective又是binary,是为了加group吗?

这样可以把不同数量的用户,分到不同的组?

lgb_ranker = lgb.LGBMRanker(
        boosting_type='gbdt', num_leaves=31, reg_alpha=0.0, reg_lambda=1,
        max_depth=-1, n_estimators=300, objective='binary',
        subsample=0.7, colsample_bytree=0.7, subsample_freq=1,
        learning_rate=0.01, min_child_weight=50, random_state=2018,
        n_jobs=-1) 


g_train = train_final_df.groupby(['user_id'], as_index=False).count()["label"].values

不好意思,这个地方应该是个笔误。objective应该用默认值lambdarank。

@jt120
Copy link
Author

jt120 commented Jul 6, 2020

2分类的lambdarank?是因为评价指标是NDCG,所以用lambdarank吗?

@xuetf
Copy link
Owner

xuetf commented Jul 6, 2020

2分类的lambdarank?是因为评价指标是NDCG,所以用lambdarank吗?

您好。lambdarank也仅是作为一种尝试。在这个场景下,和直接binary的objective差异确实不是很大,有略微优势。可以尝试看下另一个赛道KDD CUP 2020 multimodal recall(一种方案)。那个场景下用lambdarank可能更适合一些。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants