Dear friends,
With my data, adding some predictors variables I did not find any particular example about how to plot a NNETAR model, and also I would ask which metrics I should use to evaluate this PI?
library(fpp3)
library(imputeTS)
serie <- tibble(data = seq(as.Date("1949-01-01"), length = 24, by = "month"),
value1 = sample(1:24),
value2 = sample(1:24)) %>%
as_tsibble() %>%
fill_gaps(.full = TRUE)
serie<- serie %>%
na_kalman()
fit_nn <- serie %>%
model(NNETAR(value1 ~ value2 + trend() + season() + AR(p = 4), n_nodes = 14, scale_inputs = T))
future <- new_data(serie, 1) %>%
mutate(value2 = mean(serie$value2)) %>%
mutate(value1 = 6)
fc <- forecast(fit_nn,new_data = future)
Plotting only a point forecast as an example
serie %>%
autoplot(value1) +
autolayer(fc) +
labs(title = "Forecast of Power Generated")
Thansk in Advance