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

Improve performance of aggregation feature calculation #209

Merged
merged 1 commit into from Aug 15, 2018

Conversation

Projects
None yet
3 participants
@kmax12
Member

kmax12 commented Aug 14, 2018

We had logic that checked for the case where the dataframe we were aggregating on was empty or had no related instances. This logic involved a slow python loop. Due to how we fill in missing values later in the function, this check was unnecessary and could be removed.

In some benchmarks, I saw 25% speeds ups for calculations.

Also, added test for the empty child dataframe case, which was previously untested.

@codecov-io

This comment has been minimized.

codecov-io commented Aug 14, 2018

Codecov Report

Merging #209 into master will increase coverage by 0.02%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #209      +/-   ##
==========================================
+ Coverage   93.46%   93.48%   +0.02%     
==========================================
  Files          71       71              
  Lines        7784     7757      -27     
==========================================
- Hits         7275     7252      -23     
+ Misses        509      505       -4
Impacted Files Coverage Δ
...tests/computational_backend/test_pandas_backend.py 100% <100%> (ø) ⬆️
...turetools/computational_backends/pandas_backend.py 91.72% <75%> (+0.43%) ⬆️

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 94132fc...141adb5. Read the comment docs.

@kmax12 kmax12 requested a review from rwedge Aug 14, 2018

@rwedge

This comment has been minimized.

Contributor

rwedge commented Aug 15, 2018

Looks good!

@rwedge rwedge merged commit 391a927 into master Aug 15, 2018

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details

@rwedge rwedge referenced this pull request Aug 20, 2018

Merged

v0.2.2 #220

@kmax12 kmax12 deleted the remove-slow-related-check branch Oct 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment