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

How to use feature-selector for 3 classes #51

Open
chawengs opened this issue Jun 7, 2022 · 3 comments
Open

How to use feature-selector for 3 classes #51

chawengs opened this issue Jun 7, 2022 · 3 comments

Comments

@chawengs
Copy link

chawengs commented Jun 7, 2022

Hi Will,
Thanks for your feature selector tool. It work fine for 2 classes feature selection. I have tried to use for 3 classes. It reports error as details.

LightGBMError: Multiclass objective and metrics don't match

Do you know how to fix it

Regards,
Chaweng

@code-yuan-shi
Copy link

Have you solved it yet? if yes, how to?

@code-yuan-shi
Copy link

基本确定了,eval_metric设定为AUC导致报错的(AUC不支持多分类吧),删除掉这个参数或者指定为logloss等评估指标就可以了

@chawengs
Copy link
Author

chawengs commented Nov 18, 2022

You can try to remove eval_metric = eval_metric

from:
model.fit(train_features, train_labels, eval_metric = eval_metric,eval_set = [(valid_features, valid_labels)],early_stopping_rounds = 100, verbose = -1)

to:

model.fit(train_features, train_labels, eval_set = [(valid_features, valid_labels)],early_stopping_rounds = 100, verbose = -1)

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