This message was deleted.
# neural-forecast
s
This message was deleted.
k
Hey @Francisco Trejo, A common problem I have faced while working with hierarchical data, is that usually you want to preserve the hierarchical order of the unique_ids. If the unique_id is a string NeuralForecast sorts it lexicographically. To maintain the hierarchical order of the unique_id I like to change it from string into a categorical variable. Here is an example with a
sort_df_hier
function : https://nixtla.github.io/neuralforecast/examples/hierarchicalnetworks.html Let me know if this helps.
e
@Kin Gtz. Olivares Thank you for the insight - I'm confused, however, as to why the order of the unique_id's would change the results prior to reconciliation? Does it have something to do with how the time series are batched during training?
k
The bootstrap reconciliation is performing a matrix operation that requires the series to be hierarchically ordered: y_tilde = S P y_hat https://github.com/Nixtla/neuralforecast/blob/main/neuralforecast/models/hint.py#L259
f
@Kin Gtz. Olivares I should clarify that I am not using HINT or any reconciliation method yet. I am merely using NHITS with NeuralForecast. The biggest difference is that the way the unique_ids are formatted and the order of them seem to matter. When I use unique_ids with the "/" in them I get different results than the unique_ids that have "_" in them. Even if the order is completely the same.
k
Sorry @Francisco Trejo, I would need more information to know what is breaking in your application, still my intuition is that taking care of the unique_id ordering should do the trick.