-
Notifications
You must be signed in to change notification settings - Fork 42
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
time boost in folds generation #42
base: master
Are you sure you want to change the base?
Conversation
tscv/_split.py
Outdated
begin = max(0, subindex[0] - before) | ||
end = min(subindex[-1] + after + 1, n_samples) | ||
complement = np.intersect1d(complement, | ||
np.setdiff1d(allindices, allindices[begin:end])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify this line by using the fact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @WenjieZ , I'm sorry, I didn't get it, can you reformulate your statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, right! fixed!
Thank you
Hi @aldder , please time the updated version and report the performance gain. |
Codecov Report
@@ Coverage Diff @@
## master #42 +/- ##
=======================================
Coverage 97.51% 97.51%
=======================================
Files 3 3
Lines 643 645 +2
=======================================
+ Hits 627 629 +2
Misses 16 16
Continue to review full report at Codecov.
|
With contiguous test sets:
With uncontiguous test sets: