https://github.com/nixtla logo
h

Hector G. LOPEZ-RUIZ

10/24/2022, 10:47 AM
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

fede (nixtla) (they/them)

10/24/2022, 4:22 PM
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

Hector G. LOPEZ-RUIZ

10/24/2022, 5:22 PM
Hello Fede. Worked. Thank you. Also, I just recently started using Nixtla. What a great job you guys have done. 👍🏽 congrats.
f

fede (nixtla) (they/them)

10/24/2022, 5:27 PM
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

Kin Gtz. Olivares

10/25/2022, 3:16 PM
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

Hector G. LOPEZ-RUIZ

10/25/2022, 3:31 PM
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

Kin Gtz. Olivares

10/25/2022, 3:32 PM
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

Ginger Holt

10/28/2022, 9:30 PM
Thank you @Kin Gtz. Olivares for the fix and update!
2 Views