-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
We might want to exclude certain dates from our datasets. Something like:
date_range = Date(2018, 1, 1):Day(1):Date(2020, 1, 1)
# Normal date selection
selector = RandomSelector(42, 0.10, Day(3))
validation, holdout = partition(date_range, selector)
# But we don't want these dates
bad_dates =[Date(2019, 1, 1), Date(2019, 12, 1)]
# Do selection as usual, just don't return any of the bad dates
selector_exc = DateExclusionSelector(selector, bad_dates)
validation_exc, holdout_exc = partition(date_range, selector_exc)
# The following should hold:
@assert validation_exc == setdiff(validation, bad_dates)
@assert holdout_exc == setdiff(holdout, bad_dates)
Metadata
Metadata
Assignees
Labels
No labels