-
Notifications
You must be signed in to change notification settings - Fork 4
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
194-align-training-window-with-user-defined-temporal-extent #195
194-align-training-window-with-user-defined-temporal-extent #195
Conversation
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.
Great work! Just few remarks for now.
src/worldcereal/utils/refdata.py
Outdated
|
||
def get_best_valid_date(row): | ||
""" | ||
Determine the best valid date for a given row based on forward and backward shifts. |
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.
is this a standard Numpy docstring? Hard to see from github changes, just checking with you.
src/worldcereal/utils/refdata.py
Outdated
|
||
# get the middle of the user-defined temporal extent | ||
start_date, end_date = processing_period.to_datetime() | ||
processing_period_middle_ts = start_date + pd.DateOffset(months=5) |
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.
the middle is hard to define with an even number of timesteps. Should we be aligned with e.g. this? And therefore rather add 6 months? I may be wrong here, was just wondering.
src/worldcereal/utils/refdata.py
Outdated
# save the true valid_date for later | ||
true_valid_date_map = sample_dates.set_index("sample_id")["valid_date"] | ||
|
||
# calculate the shifts and assignt new valid date |
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.
small typo in comment
No description provided.