Closed nikitagupta55 closed 7 years ago
Can't run your example right now, but it looks like the problem is probably the tk_ts_df
object: the input timeseries in hybridModel()
should only be a ts
object or a numeric vector. Try converting it to one of these.
@dashaub It doesn't support timetk object ? Like other models (arima,hw) from forecast package do?
If the base models arima
, ets
, etc support it, it should be a pretty easy fix to add support. I'll take a look and let you know.
@dashaub Base models completely supports it. Also I believe that, hybridModel will also not support sweep package. If you could make that work too, it will be great.
For eg: I use sweep to make my forecast result tidy like below:
forecast <- forecast(fit, h = 10, level = c(70,85)) forecast_tidy <- sw_sweep(forecast , fitted = TRUE , timetk_idx = TRUE)
This works completely fine on ARIMA, ets etc
Fixed on Github now, should be up on next CRAN release in about a month.
Awesome, will this support sweep also?
Yes, both should work. Try it out and confirm if you like
devtools::install_github("ellisp/forecastHybrid/pkg")
@dashaub It works completely fine now as expected. Thanks. Would you mind putting some relevant answer here : https://stackoverflow.com/questions/45429069/ts-object-not-recognised-in-hybridmodel-of-forecasthybrid-package ; I asked this question on stackoverflow.
done
Data is something like this:
I'm trying to apply hybridModel on timeseries data to perform ensemble.Below is my code:
On fitting timeseries object tk_ts_df (ts object) to hybridModel; it's giving error : "The time series must be numeric and may not be a matrix or dataframe object."
But on link: https://cran.r-project.org/web/packages/forecastHybrid/vignettes/forecastHybrid.html
It's clearly mentioned : The workhorse function of the package is hybridModel(), a function that combines several component models from the “forecast” package. At a minimum, the user must supply a ts or numeric vector for y
Please suggest what I'm doing wrong.