Conversation
|
pinging @chrisholder since otherwise I can't add him reviewer |
|
note: this fails with some of the forecasters that are not yet refactored, since it can happen that I see two ways to address this:
My preference is no.1, since it might add redundant checks and impose less stringent interface compatibility conditions on new forecasters. |
|
I've found a better option no.3 - initialize the |
|
ready for review |
|
from verbal discussion with @mloning, @mloning reviewed this and did not like two things:
Overall, we agreed that I can make the call to merge this PR, in the interest of time and dependent development activities of @GuzalBulatova and @thayeylolu. Further, we can have detail discussions on the necessary tags later, and see it as a delta to this PR rather than a blocker for this PR. The call I made is as follows:
FYI, @aiwalter, @TonyBagnall. |
|
@fkiraly Great effort, Franz! This is one monster of a PR. I have seen all your comments/resolutions to my review conversations and am happy with decisions made. There was one conversation in which you gave two opposite answers to the same question (whether MvS is always pandas frames or not), but I do not think that is actionable in this PR. |
|
@GuzalBulatova, @thayeylolu, this is now merged - and it should be useable in your work on multivariate forecasters. |
The pd.DataFrame->pd.Series conversion was incorrectly missing from `_convertIO` (from #980), this is fixed now. Merging quickly since urgent bugfix
This is a merge/review ready sketch for how multivariate
ycould be supported for multivariate forecasters, alongside the possibility to passnp.arrayandpd.Series. This is based on the design in STEP no.5, adapted to the new forecasting base class.The key ingredient are:
convertIOmodule. Besides the obvious conversion functionality, the converters can be given access to a dictionary via reference in thestoreargument, where information for inverting lossy conversions (like frompd.DataFrametonp.array) can be storedy_typewhich encodes the type ofythat the private_fit,_predict, and_updateassume internally - for now, it's just one type and not a list of compatible typesfit,predict,update, which converts inputs to the public layer to the desired input of the logic layer and backThis is for discussion, and I expect major change before we merge.
It might be especially interesting to discuss the following interaction with typing:
the third argument of the converter, the "as" argument, is a scitype, and designed to have the same name as the respective
typingcomposite type. Also see discussion in #965, #973 and #974.Thinking of the logical continuation of this:
Xcheck_Xetc should be replaced by checks of the kindcheck(what, as : scitype), e.g.,check(y, "Series")should replace the less genericcheck_y.A "visionary" pathway may see this working with type annotations that are scitypes, not
typingmachine types, e.g.,and checks/conversions being done automatically.