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

Fix scalar comparison primitives that can fail during feature calculation in some cases #2434

Merged
merged 5 commits into from
Jan 5, 2023

Conversation

thehomebrewnerd
Copy link
Contributor

Fixes #2080

Fixes and issue where DFS can create features that cannot be calculated. These features were using the binary comparison to scalar primitives that would attempt to compare a datetime column to a numeric scalar value. This PR removes Ordinal and Datetime input types from the following primitives:

  • LessThanScalar
  • GreaterThanScalar
  • LessThanEqualToScalar
  • GreaterThanEqualToScalar

@thehomebrewnerd thehomebrewnerd changed the title Fix scalar comparisons Fix scalar comparison primitives that can fail during feature calculation in some cases Jan 4, 2023
@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Merging #2434 (f89882e) into main (0f2dc08) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2434      +/-   ##
==========================================
- Coverage   99.44%   99.41%   -0.04%     
==========================================
  Files         340      340              
  Lines       20908    20862      -46     
==========================================
- Hits        20793    20739      -54     
- Misses        115      123       +8     
Impacted Files Coverage Δ
...s/tests/primitive_tests/test_transform_features.py 99.87% <ø> (-0.01%) ⬇️
...d/transform/binary/greater_than_equal_to_scalar.py 100.00% <100.00%> (ø)
...s/standard/transform/binary/greater_than_scalar.py 100.00% <100.00%> (ø)
...dard/transform/binary/less_than_equal_to_scalar.py 100.00% <100.00%> (ø)
...ives/standard/transform/binary/less_than_scalar.py 100.00% <100.00%> (ø)
...mputational_backend/test_feature_set_calculator.py 100.00% <100.00%> (ø)
.../primitives/standard/transform/binary/less_than.py 92.30% <0.00%> (-7.70%) ⬇️
...imitives/standard/transform/binary/greater_than.py 92.30% <0.00%> (-7.70%) ⬇️
...es/standard/transform/binary/less_than_equal_to.py 92.30% <0.00%> (-7.70%) ⬇️
...standard/transform/binary/greater_than_equal_to.py 92.30% <0.00%> (-7.70%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gsheni gsheni merged commit 2224b0d into main Jan 5, 2023
@gsheni gsheni deleted the fix-scalar-comparisons branch January 5, 2023 16:04
@thehomebrewnerd thehomebrewnerd mentioned this pull request Jan 5, 2023
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.

Featuretools can generate features with comparison primitives that fail on calculation
2 participants