fabletools icon indicating copy to clipboard operation
fabletools copied to clipboard

Calculation of combination weights in the combination_ensemble function

Open xqnwang opened this issue 3 years ago • 0 comments

In the combination_ensemble() function, the inverse variances weights are calculated using innovation residuals (residuals on the transformed scale) obtained from individual models rather than response residuals. I think that's a mistake especially if it's a multiplicative error model for ETS. This may be fixed by replacing the original code in the combination_ensemble() function inv_var <- map_dbl(x, function(x) 1/var(residuals(x)$.resid, na.rm = TRUE)) with inv_var <- map_dbl(x, function(x) 1/var(residuals(x, type = "response")[[".resid"]], na.rm = TRUE)).

xqnwang avatar Jul 05 '21 08:07 xqnwang