Closed ellisp closed 8 years ago
Nice idea. I was considering this yesterday and am also thinking lists are a good way of handling this. Furthermore, we need to consider if we expose shared arguments between models (e.g. lamda) in these lists or with a common argument. If it is in a common argument and the list, the list should take priority over the shared argument to allow the use to pass different values to each model (e.g. lambda is shared by ets, auto.arima, and nnetar while tbats takes use.box.cox. The user should be able to set lambda = 0.5 as an argument for all functions while also setting e.args(lambda = 0.75) and t.args = list(use.box.cox = FALSE) for example).
This is closed in d2e4b967914debcb4b8223ab81f2b048d053c001
xreg
is removed as an argument and now handled in a.args
and s.args
(e.g. a.args = list(xreg = matrix(rnorm(10, nrow = 5))
lambda
remains as an argument but can also be passed in a.args
/e.args
/n.args
/s.args
. If it is passed as both an argument and in one of the lists, the more specific list takes priority (for that particular model).
For example,
hybridModel(rnorm(100), models = "aents", lambda = 0.5, a.args = list(lambda = 0.75), e.args = list(lambda = 0.25)
will set lambda
to 0.75 for the auto.arima model, 0.25 for the ets model, and 0.5 for the other models (ignored by tbats since tbats merely uses/doesn't use a transform during model selection).
probably by
, a.args = list(), e.args = list(), b.args = list(), t.args = list()