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

Add Label Encoder to LightGBM #1152

merged 17 commits into from Sep 10, 2020

Add Label Encoder to LightGBM #1152

merged 17 commits into from Sep 10, 2020


Copy link

@bchen1116 bchen1116 commented Sep 9, 2020

Fix #1109

Add label Encoder for Binary classification case for LightGBM.

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/ 100.00% <100.00%> (ø)
...alml/tests/component_tests/ 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.

Copy link
Contributor Author

bchen1116 commented Sep 10, 2020

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

@jeremyliweishih jeremyliweishih left a comment

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

Copy link

@freddyaboulton freddyaboulton left a comment

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

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