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

Specifying start/end day and length of a target/precursor period #3

Open
BSchilperoort opened this issue Nov 18, 2022 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@BSchilperoort
Copy link
Contributor

In @Peter9192's review of AI4S2S/s2spy#113, he voiced his desire to be able to specify target and precursor periods by the end date and length;

e.g. if I want to issue a forecast by the end of may, I want to start appending precursors from 31 may backwards.

However, this leads to some non-trivial issues like:

  • How do we deal with leap years? As the periods are unaware (yet) of which year they will belong to, we do not know if it is a leap year or not. A "simple" solution is to just ignore leap days.

  • How do we determine which year the date specifies?

    • E.g., if the anchor is June 1st, and you specify an end date of June 5th, does this mean 4 days after or 361 days before the anchor. Does the (default) behavior depend on target=True/target=False?
    • And what if someone wants to define a date two years ahead of the anchor?

And lastly, do we want to support start_date, end_date, and length, and have the user use 2/3 to define the period?

@geek-yang
Copy link
Member

e.g. if I want to issue a forecast by the end of may, I want to start appending precursors from 31 may backwards.

I think most of the use cases with this kind of need will be solved by AdventCalendar. Only some edge cases would need CustomCalendar for backward counting, I assume. I think it is better to come up with new type of calendars to address these special needs rather than change the BaseCalendar to allow for more flexibility.

@Peter9192
Copy link
Contributor

  • A "simple" solution is to just ignore leap days.

agree, or don't allow it.

  • E.g., if the anchor is June 1st, and you specify an end date of June 5th, does this mean 4 days after or 361 days before the anchor.

Since s2s usecases are usually interested in predicting (ahead of time), I think this would mean 361 days before.

  • And what if someone wants to define a date two years ahead of the anchor?

In the very beginning I had the thought that you could allow this by setting the periodicity of the calendar. Back then we had the adventcalendar doing something like n_targets = 365 / target_length, and that could conceptually very easily be changed to a multiple of 365. The idea came from a visualization that Sem showed, something like this:

image

you could drag the start and end but it would always have this cyclic pattern. The length of this cycle can be changed though.

@BSchilperoort BSchilperoort transferred this issue from AI4S2S/s2spy Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants