Hello again. The previous error is no longer happe...
# general
h
Hello again. The previous error is no longer happening. I restarted the runtime and it started working. Got very excited by the fact that there is a forecast. However I then had an error in the reconciliation. It says the array cannot contain infs of Nans (see screenshot). I checked the three inputs to see if there were any. If my check is correct (see screenshot) there are none. Any ideas? Thank you for all your help.
f
hey @Hector G. LOPEZ-RUIZ! I’m suspecting that the problem is related to
MinTrace(method='mint_shrink')
. Could you please try removing it to know if that’s the method that breaks the pipeline? 🙌
h
Hello Fede. Worked. Thank you. Also, I just recently started using Nixtla. What a great job you guys have done. 👍🏽 congrats.
f
Thank you, @Hector G. LOPEZ-RUIZ! I have a good idea of what might be happening with the
mint_shrink
bug. We will fix it soon. Please let us know if you have any other issues or special features you would like
hirarchicalforecast
to have. 🙂
k
Hi @Hector G. LOPEZ-RUIZ, I am working on debugging the MinTrace-shrinkage method. I wonder if the data that you are using for your experiments is public, that would help me to explore the numerical instability causes.
h
Hello Kin, I can send it to you. No problem. But I can send it tomorrow because I’ve left the office (8 hour time diff.)
k
That sounds good, blind debugging is on steroids 👍
Hi @Ginger Holt and @Hector G. LOPEZ-RUIZ I added numerical protections to
MinTrace
, available now in HierarchicalForecast's main. The origin of the error are series with very low insample residual variance. Example
y_model=[1,1,1,1] y_hat=[1,1,1,1]
. You can force MinTrace to run in such scenarios with the following: • I added the
mint_shr_ridge
parameter to
MinTrace
class, that forces the covariance matrix to be invertible. In case you want to numerically force the method. • Another trick that helped me in the past on these ill conditioned variance matrix is to add white noise to
Y_df['y']
that works almost like the
mint_shr_ridge
, but in a stochastic version. Hope this helps
g
Thank you @Kin Gtz. Olivares for the fix and update!