Skip to content
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

MinTraceSparse(nonnegative=True) #239

Open
tbellamey opened this issue Oct 4, 2023 · 1 comment
Open

MinTraceSparse(nonnegative=True) #239

tbellamey opened this issue Oct 4, 2023 · 1 comment

Comments

@tbellamey
Copy link

Description

As of release 0.4.0, the MinTraceSparse() reconciliation function is executable, but only as MinTraceSparse(nonnegative=False). In order to produce a sparse reconciliation with nonnegative forecasts, it would be helpful to extend this function to accept MinTraceSparse(nonnegative=True).

Use case

In some use case domains, forecasts should be constrained to strictly nonnegative values. For example, if one is forecasting sales units over a time horizon, a reconciled forecast generating negative units wouldn't make practical sense. While it is possible to cap these negative forecasts to 0 units post-reconciliation, the workaround is inelegant & may not produce results consistent with a true nonnegative implementation of MinTraceSparse().

@mcsqr
Copy link
Contributor

mcsqr commented Nov 17, 2023

Yeeah, I agree. But TBH I haven't had time to do it, or check if it's at all doable with the method of Hyndman et al. in the sparse approach. What is certainly doable (and was actually advocated by Hyndman as a reasonable poor-man's solution to this problem), is to take MinTSparse, cap all the negative bottom time series to zero, and do BottomUpSparse again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants