-
Notifications
You must be signed in to change notification settings - Fork 31
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
Reconciliation interface design #366
Comments
Do people get to vote on it ;)? I like options A and B - isn't it possible to implement both of them (or A and C for that matter) if |
One step backTalking with Tommy, the role of reconciliation is unclear. In this framework, we are doing: data |>
... |>
model(...) |>
reconcile(...) |>
forecast(...) However, the real strength of reconciliation is that it is based on forecasts, not models. For example, the previous structure does not match with judgmental forecasts. In such situations, we need somenthing like this data |>
... |>
forecast(...) |>
reconcile(...) However, how to take the residuals for the covariance matrix is still a problem with this configuration. |
Yes, welcoming votes and discussion. It's possible to implement all of the above at the same time, but that could be confusing as many functions give the same result. |
We can also have a |
Yes sure. The judgemental forecasting (e.g. the Delphi method) I was referring to is just an example where reconciliation should be applicable when the model object is not readily available. For example, when one has forecasts that do not come from the fable package (maybe come from computationally intensive machine learning models in python or c++) but are stored in a csv file and loaded in R as a fable object, reconciliation should still be possible, since reconciliation depends on the forecasts themselves (and the covariance matrix), not models that generate the forecasts. If fable contains all possible forecast models so forecasts can come from fable in any case, then building the reconcile function only on top of mable objects may be reasonable, but that might be too strong of an assumption to make. |
I agree with @danigiro in saying that reconciliation should be independent of the models. When I first read how
is really how I think of reconciliation. |
I agree that it should be possible to reconcile a The current interface of reconciling a |
From my discussions with @mitchelloharawild today, there seems to be some overlap between "reconciliation of forecasts" and "reconciliation of data" more generally -- i.e. users might need to do "reconciliation" on imported data before any modelling. In general, it could be useful to make something like |
Had another discussion with @robjhyndman today, mostly about graph reconciliation data structures. We have also discussed functions to impose aggregation constraints into a tsibble. A weights column could be used for defining linear combination weights across nodes, but for arbitrary graphs an edge linked weights matrix might be needed. Option D is the interface we're leaning toward, the function drastically changes the output and is simple to learn. All other parameters can then be arguments with suitable defaults. Some practical examples on graph coherency would be useful before finalising an interface for this. From my imagining it seems that graphs are usually suited to being the only aggregation column, but it is theoretically possible to nest and cross these graph hierarchies. I'm struggling to think of a graph linear combination reconciliation problem that isn't adequately represented with grouped hierarchies. The closest I've come is this toy example: The number of apples and oranges sold determine both the total weight of produce and the total price/sales over time. Then these metrics are combined to give some measure of value. 🤷 I'm going to continue trying to think of useful graph reconciliation problems, but it may not be something necessary to incorporate into the interface. If it is incorporated I think the graphs would be represented via a single key column with some extra attributes that describe the relations between nodes. |
I've thought about this more from a data structures perspective and I think it is neatest to store a graph of the constraints in the tsibble/mable/fable objects. https://arxiv.org/abs/2204.09231 provides some details on how to keep some nodes immutable, which I think is how we should handle 0 variance nodes. |
Yes, I think so too |
User-defined control parameters.
Are there more things that can be customised here?
User interface
Data structure and value combination method/type
Data structure and combination method are passed in via data attributes created at the
aggregate_*()
step.Allow the user to directly impose data structure constraints, for example defining a pre-existing aggregation structure from the data.
This can also be used to remove aggregation structure to create disjoint hierarchies
For example, you may have a cross-temporal structure but only want to make it temporally coherent. To achieve this, you can remove the key aggregation constraints.
Hold onto aggregation structure in
<tsibble>
, and<mdl_lst>
Code
Allow reconciliation of mables, fitted models, and model definitions.
Option A -
reconcile()
on model with all params as argsOption B -
reconcile()
on mable with opt function as reconcile input fnOption C -
reconcile()
on mable with construction function as reconcile input fnOption D -
reconcile()
on mable with node utilisation function as reconcile input fnAttention: @danigiro, @robjhyndman, @GeorgeAthana
The text was updated successfully, but these errors were encountered: