Quoted from the paper: (1) "y^(p)l = MaxPool(y_l, k_l)"; (2) "h_l = MLP_l(y^(p)_l); theta^f_l = LINEAR^f(h_l); theta^b_l = LINEAR^b(h_l)"; (3) "yhat_{tau,l} = g(tau, theta^f_l)" with "|theta^f_l| = ceil(r_l H)"; (4) "g(tau, theta) = theta[t1] + ((theta[t2]-theta[t1])/(t2-t1))(tau-t1)"; doubly residual stacking "yhat = sum_l yhat_l; y{l+1} = y_l - ytilde_l" – Challu, C., Olivares, K. G., Oreshkin, B. N., Garza, F., Mergenthaler-Canseco, M. and Dubrawski, A., N-HiTS, AAAI 2023 (arXiv:2201.12886). wf[[l]] and wb[[l]] stand in for MLP_l followed by LINEAR: a single caller-supplied linear map. That collapse is stated rather than hidden; the expressivity ratio r_l still governs the coefficient count, which is the hierarchical part the paper is about.
Examples
set.seed(2)
y <- sin(2 * pi * (1:16) / 8)
wf <- list(matrix(rnorm(2 * 8, 0, 0.3), 2, 8))
wb <- list(matrix(rnorm(16 * 8, 0, 0.3), 16, 8))
r <- morie_nhitsnet(y, horizon = 2, kernels = 2L, ratios = 1,
wf = wf, wb = wb)
str(r, max.level = 1)
#> List of 8
#> $ forecast : num [1:2] 0.852 0.175
#> $ residual : num [1:16] -0.438 1.591 0.849 1.071 -0.392 ...
#> $ nblocks : int 1
#> $ sizes : int 2
#> $ first : num 0.852
#> $ last : num 0.175
#> $ mean : num 0.513
#> $ residnorm: num 3.91
