Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multivariate nnetar #263

Open
gabrielcaceres opened this issue Mar 30, 2016 · 3 comments
Open

multivariate nnetar #263

gabrielcaceres opened this issue Mar 30, 2016 · 3 comments

Comments

@gabrielcaceres
Copy link
Contributor

Would you be interested in having nnetar being able to jointly fit/forecast multiple time series? (essentially turning it into "nnetVar" to do vector autoregression)

nnet can already handle multiple outputs, so that should be quite straightforward. The only tricky part might be making sure none of the internals of nnetar break when a matrix instead of a vector is being used to create lags, forecast, etc.

@robjhyndman
Copy link
Owner

Yes. This would be a useful addition. I imagine you would want all of the inputs used in each of the univariate models to be available to each output in the multivariate case. We now have some facilities for multivariate forecasting with the mforecast class, so forecast.nnetar() should return something of class "mforecast" if there is more than one series. Existing functions that return that class are forecast.mlm and forecast.varest

@gabrielcaceres
Copy link
Contributor Author

I'm not sure I completely follow what you mean regarding the inputs... but if I understand correctly, it should automatically be taken care of since all the inputs and outputs are actually connected in a single network.

There are aspects a multivariate neural network model that are more intrinsically tied together than in regular multivariate regression. The extra output neuron has its own independent parameters (as in multivariate regression), but the coefficients of hidden-layer neurons are shared and jointly estimated for both outputs. In a way, the the hidden-layer parameters are estimated on the pooled data (using all of the available inputs), while the output neurons independently model each series (using the hidden-layer outputs).

@robjhyndman
Copy link
Owner

OK. Thanks for the explanation. I haven't fitted multiple output ANNs before so I wasn't sure how the input/output relationships worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants