Skip to content

Have OHE return Boolean columns #2170

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 10 commits into from
Apr 22, 2021
Merged

Have OHE return Boolean columns #2170

merged 10 commits into from
Apr 22, 2021

Conversation

bchen1116
Copy link
Contributor

fix #2169

@bchen1116 bchen1116 self-assigned this Apr 21, 2021
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #2170 (bb017db) into main (3caee9e) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             main    #2170     +/-   ##
=========================================
+ Coverage   100.0%   100.0%   +0.1%     
=========================================
  Files         295      295             
  Lines       24376    24389     +13     
=========================================
+ Hits        24366    24379     +13     
  Misses         10       10             
Impacted Files Coverage Δ
...components/transformers/encoders/onehot_encoder.py 100.0% <100.0%> (ø)
...alml/tests/component_tests/test_one_hot_encoder.py 100.0% <100.0%> (ø)

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 3caee9e...bb017db. Read the comment docs.

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.

I think this looks great Bryan!

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.

Looks good @bchen1116 !!

if name == 'integers':
assert str(types) == "Integer"
else:
assert str(types) == "Boolean"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great! I love that you made this general and not specific to xgboost.

One check I'd add: assert that the right number of features has been generated. That way, if for some reason the OHE isn't generating any features at all for the bool/category inputs, the test will fail.

@bchen1116 bchen1116 merged commit 1762f83 into main Apr 22, 2021
This was referenced May 4, 2021
@freddyaboulton freddyaboulton deleted the bc_2169_ohe branch May 13, 2022 15:02
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.

Have OHE return Boolean columns
4 participants