Hello, I'm currently experimenting with Nixtla sta...
# general
j
Hello, I'm currently experimenting with Nixtla stack, and in particular with hierarchical reconciliation. I want to ask if there exists a nice and easy way to reconciliate a couple of different models of different type? What I'm trying to perform is to have an ARIMA forecast the top part of the hierarchy, and NHITS the bottom part of it (yes I'm aware that this is quite a dumb idea, but in my defense I don't know any statsforecast intermittent demand models which would accept exogenous variables). Also a small petition to add this or a similar example to the hierarchicalforecast documentation.
t
Not a dumb idea at all! Something similar is one of my go-to methods. All you have to do is use hierarchical forecast, build the dataset (here assuming the hierarchy is business=>item):
spec = [['business'],
['business', 'unique_id']
]
train_agg, S_train, tags = aggregate(df[['y','unique_id','ds','business']], spec)
Once you have that then just fit and predict for each train_agg index (the index should be the hierarchy bit). You can tell where you are in the hierarchy based on the index and determine (either in a loop or custom function and group by) how to fit that series. After that you just need to format the output into train and fit dataframes to do normal reconciliation stuff with hierarchicalforecast.
j
Great answer! But quite honestly I'm the lazier sort of person so I had hope that there is some sort of a quick fix or a one liner which I simply wasn't aware of which could simply join my predictions from these two (or preferably N) models into a format which could be then reconciliated (so basically similar to the way that it's done for a single model in the documented example but with "one weird trick"™️).