Skip to content

Add Label Encoder to LightGBM #1152

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

Merged
merged 17 commits into from
Sep 10, 2020
Merged

Add Label Encoder to LightGBM #1152

merged 17 commits into from
Sep 10, 2020

Conversation

bchen1116
Copy link
Contributor

Fix #1109

Add label Encoder for Binary classification case for LightGBM.

@codecov
Copy link

codecov bot commented Sep 9, 2020

Codecov Report

Merging #1152 into main will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1152   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files         195      195           
  Lines       11515    11554   +39     
=======================================
+ Hits        11505    11544   +39     
  Misses         10       10           
Impacted Files Coverage Δ
...ents/estimators/classifiers/lightgbm_classifier.py 100.00% <100.00%> (ø)
...alml/tests/component_tests/test_lgbm_classifier.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59f1bd3...7e10616. Read the comment docs.

@bchen1116
Copy link
Contributor Author

Changed implementation to encode the labels if they weren't int64, regardless of whether it is binary or multiclass. I had run into errors when trying to pass string labels for multiclass instance, and this change fixed it.

Copy link
Collaborator

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @bchen1116 - just a couple small comments but nothing blocking.

Copy link
Contributor

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bchen1116 Looks good to me!

@bchen1116 bchen1116 merged commit a0be178 into main Sep 10, 2020
This was referenced Sep 17, 2020
@freddyaboulton freddyaboulton deleted the bc_1109_labelencoder branch May 13, 2022 14:50
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

Successfully merging this pull request may close these issues.

LightGBM component doesn't support non-numeric targets
3 participants