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

Only calculate features for instances before cutoff #523

Merged
merged 3 commits into from
Apr 30, 2019

Conversation

CJStadler
Copy link
Contributor

When a single cutoff_time is provided.

Resolves #437

When a single cutoff_time is provided.
@codecov
Copy link

codecov bot commented Apr 30, 2019

Codecov Report

Merging #523 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #523      +/-   ##
=========================================
+ Coverage    96.1%   96.1%   +<.01%     
=========================================
  Files         108     108              
  Lines        8898    8913      +15     
=========================================
+ Hits         8551    8566      +15     
  Misses        347     347
Impacted Files Coverage Δ
...imitive_tests/test_groupby_transform_primitives.py 100% <100%> (ø) ⬆️
...computational_backends/calculate_feature_matrix.py 97.09% <100%> (+0.01%) ⬆️
...utational_backend/test_calculate_feature_matrix.py 99.33% <100%> (+0.01%) ⬆️
featuretools/tests/dfs_tests/test_dfs_method.py 98.41% <100%> (ø) ⬆️

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 4cbca08...fd9c909. Read the comment docs.

@rwedge
Copy link
Contributor

rwedge commented Apr 30, 2019

From the coverage report it looks like some code related to missing data relied on the old way of using all the instances in order to be tested.

https://github.com/Featuretools/featuretools/blob/269307e8b1e2214e8ad422d524e412ce0d47f4b3/featuretools/computational_backends/pandas_backend.py#L252-L255

https://github.com/Featuretools/featuretools/blob/269307e8b1e2214e8ad422d524e412ce0d47f4b3/featuretools/computational_backends/pandas_backend.py#L277-L280

We might be able to test this code with a test using a single cutoff time and a list of instance ids that includes instances whose time index is after the cutoff time.

@CJStadler
Copy link
Contributor Author

@rwedge I added a test and I think the coverage is good now. Back to you.

Copy link
Contributor

@rwedge rwedge 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

@CJStadler CJStadler merged commit f2feb3f into master Apr 30, 2019
@CJStadler CJStadler deleted the remove-instances-after-cutoff branch April 30, 2019 19:00
@rwedge rwedge mentioned this pull request May 17, 2019
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.

Only calculate features for instances before cutoff time
2 participants